mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-07-01 05:14:17 +00:00
add project adins
This commit is contained in:
parent
ad06ac5505
commit
f8f85d679d
5299 changed files with 625430 additions and 0 deletions
|
@ -0,0 +1,39 @@
|
|||
package com.adins.mss.coll.commons;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.adins.mss.base.commons.ViewImpl;
|
||||
import com.adins.mss.coll.interfaces.callback.DepositReportCallback;
|
||||
import com.adins.mss.dao.DepositReportD;
|
||||
import com.adins.mss.dao.DepositReportH;
|
||||
import com.adins.mss.dao.TaskD;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by kusnendi.muhamad on 31/07/2017.
|
||||
*/
|
||||
|
||||
public class ViewManager extends ViewImpl implements DepositReportCallback {
|
||||
public Activity activity;
|
||||
|
||||
public ViewManager(Activity activity) {
|
||||
super(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void OnFillHeader(int totalTask, int paidTask, int failTask, int visitTask) {}
|
||||
|
||||
@Override
|
||||
public void OnFillDetail(HashMap<DepositReportH, List<DepositReportD>> packedListOfBatch) {}
|
||||
|
||||
@Override
|
||||
public void OnLoadReconcileData(List<TaskD> reconcileReport, int totalNeedPrint) {}
|
||||
|
||||
@Override
|
||||
public void OnError(boolean value) {}
|
||||
|
||||
@Override
|
||||
public void OnFinish(boolean value) {}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/gradient_end"/>
|
||||
<corners android:radius="8px"/>
|
||||
<stroke android:width="2dp" android:color="@color/gradient_start"/>
|
||||
</shape>
|
|
@ -0,0 +1,159 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/mnSearch"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@android:drawable/ic_menu_search"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnpending"
|
||||
android:title="@string/mnPending"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/ic_mn_pending"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnChangePassword"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/changepass_coll"
|
||||
android:visible="false"
|
||||
android:enabled="true"
|
||||
android:title="Change Password" />
|
||||
<item
|
||||
android:id="@+id/mnSetting"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/english"
|
||||
android:visible="false"
|
||||
android:enabled="true"
|
||||
android:title="@string/title_mn_setting" />
|
||||
<item
|
||||
android:id="@+id/mnGPS"
|
||||
app:showAsAction="always"
|
||||
android:icon="@drawable/location_off"
|
||||
android:visible="true"
|
||||
android:enabled="true"
|
||||
android:title="GPS"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnGuide"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/dialog_ic_about"
|
||||
android:visible="false"
|
||||
android:enabled="true"
|
||||
android:title="@string/title_mn_guide"
|
||||
/>
|
||||
<item android:id="@+id/more"
|
||||
android:title="More"
|
||||
android:icon="@drawable/ic_more"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom">
|
||||
<menu >
|
||||
<item
|
||||
android:id="@+id/moreChangePassword"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/changepass_coll"
|
||||
android:visible="false"
|
||||
android:enabled="true"
|
||||
android:title="@string/title_mn_changepassword" />
|
||||
<item
|
||||
android:id="@+id/moreSetting"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/ic_repairing_service"
|
||||
android:visible="false"
|
||||
android:enabled="true"
|
||||
android:title="@string/title_mn_setting" />
|
||||
</menu>
|
||||
</item>
|
||||
<!-- <item android:id="@+id/mnViewMap" -->
|
||||
<!-- android:showAsAction="never" -->
|
||||
<!-- android:visible="true" -->
|
||||
<!-- android:title="View Map"/> -->
|
||||
<!-- <item android:id="@+id/mnViewData" -->
|
||||
<!-- android:showAsAction="never" -->
|
||||
<!-- android:title="View Data"/> -->
|
||||
<!-- <item android:id="@+id/mnPrint" -->
|
||||
<!-- android:showAsAction="never" -->
|
||||
<!-- android:title="Print"/> -->
|
||||
|
||||
<item android:id="@+id/menuMore"
|
||||
android:title="More"
|
||||
android:icon="@drawable/ic_more"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom">
|
||||
<menu >
|
||||
<item
|
||||
android:id="@+id/mnPendingTask"
|
||||
android:title="@string/mnPending"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnRecord"
|
||||
android:title="@string/voice_notes"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnInstallmentSchedule"
|
||||
android:title="@string/mn_installmentschedule"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnPaymentHistory"
|
||||
android:title="@string/mn_paymenthistory"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnCollectionActivity"
|
||||
android:title="@string/mn_collectionactivity"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnReceiptHistory"
|
||||
android:title="Receipt History"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnViewMap"
|
||||
android:title="@string/mn_viewmap"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnViewAllHeader"
|
||||
android:title="@string/mnViewAllHeader"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnViewData"
|
||||
android:title="@string/mnViewData"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mnPrint"
|
||||
android:title="@string/mnPrint"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/recapitulation"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
android:title="@string/mn_recapitulation"/>
|
||||
<item
|
||||
android:id="@+id/summary"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:visible="false"
|
||||
android:title="@string/mn_summary"/>
|
||||
|
||||
</menu>
|
||||
</item>
|
||||
</menu>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="scroll_duration">1000</integer>
|
||||
</resources>
|
|
@ -0,0 +1,52 @@
|
|||
package com.adins.mss.base.authentication;
|
||||
|
||||
import com.adins.mss.dao.GeneralParameter;
|
||||
import com.adins.mss.dao.Menu;
|
||||
import com.adins.mss.dao.User;
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class LoginUserResponse extends MssResponseType implements Serializable {
|
||||
// private Map<String, String> listUser = Collections.<String, String> emptyMap();
|
||||
@SerializedName("user")
|
||||
private User user;
|
||||
@SerializedName("listGeneralParameter")
|
||||
private List<GeneralParameter> listGeneralParameter = Collections.emptyList();
|
||||
@SerializedName("listMenu")
|
||||
private List<Menu> listMenu = Collections.emptyList();
|
||||
|
||||
// public Map<String, String> getListUser() {
|
||||
// return listUser;
|
||||
// }
|
||||
// public void setListUser(Map<String, String> listUser) {
|
||||
// this.listUser = listUser;
|
||||
// }
|
||||
|
||||
public List<Menu> getListMenu() {
|
||||
return listMenu;
|
||||
}
|
||||
|
||||
public void setListMenu(List<Menu> listMenu) {
|
||||
this.listMenu = listMenu;
|
||||
}
|
||||
|
||||
public List<GeneralParameter> getListGeneralParameter() {
|
||||
return listGeneralParameter;
|
||||
}
|
||||
|
||||
public void setListGs(List<GeneralParameter> listGeneralParameter) {
|
||||
this.listGeneralParameter = listGeneralParameter;
|
||||
}
|
||||
|
||||
public User getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(User user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.adins.mss.base.loyalti.model;
|
||||
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LoyaltyPointsResponse extends MssResponseType {
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_CODE")
|
||||
public String membershipProgramId;
|
||||
@SerializedName("LOGIN_ID")
|
||||
public String loginId;
|
||||
@SerializedName("DATA_DETAIL")
|
||||
public List<GroupPointData> dataDetail;
|
||||
}
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
package com.adins.mss.odr.accounts;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.adins.mss.dao.Account;
|
||||
import com.adins.mss.foundation.image.Utils;
|
||||
import com.adins.mss.odr.R;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* Created by olivia.dg on 11/17/2017.
|
||||
*/
|
||||
|
||||
public class AccountDetailTabFragment extends Fragment {
|
||||
private FragmentActivity activity;
|
||||
private Account account;
|
||||
private TextView txtName;
|
||||
private TextView txtAddress;
|
||||
private TextView txtPhone1;
|
||||
private TextView txtPhone2;
|
||||
private ImageView image;
|
||||
private byte[] bitmapArray;
|
||||
|
||||
public AccountDetailTabFragment(FragmentActivity activity, Account account) {
|
||||
this.activity = activity;
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.account_detail_tab, container, false);
|
||||
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
txtName = (TextView) view.findViewById(R.id.txtName);
|
||||
txtAddress = (TextView) view.findViewById(R.id.txtAddress);
|
||||
txtPhone1 = (TextView) view.findViewById(R.id.txtPhone1);
|
||||
txtPhone2 = (TextView) view.findViewById(R.id.txtPhone2);
|
||||
image = (ImageView) view.findViewById(R.id.accImage);
|
||||
|
||||
txtName.setText(account.getAccount_name());
|
||||
txtAddress.setText(account.getAccount_address());
|
||||
txtPhone1.setText(account.getAccount_phone_1());
|
||||
|
||||
if (account.getAccount_phone_2() == null && account.getAccount_phone_2().isEmpty())
|
||||
txtPhone2.setText("-");
|
||||
else
|
||||
txtPhone2.setText(account.getAccount_phone_2());
|
||||
|
||||
final String lat = account.getAccount_latitude();
|
||||
final String lng = account.getAccount_longitude();
|
||||
|
||||
try {
|
||||
String image_url = "https://maps.googleapis.com/maps/api/staticmap?center="+lat+","+lng+"&zoom=15&size=720x300&maptype=roadmap&markers=color:green%7Clabel:I%7C"+lat+","+lng;
|
||||
|
||||
// ImageLoader imgLoader = new ImageLoader(activity);
|
||||
Bitmap bitmap = getBitmapFromURL(image_url);
|
||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 80, stream);
|
||||
|
||||
bitmapArray = stream.toByteArray();
|
||||
|
||||
Bitmap bm = null;
|
||||
if(bitmapArray!=null){
|
||||
try {
|
||||
bm = Utils.byteToBitmap(bitmapArray);
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
|
||||
if (bm != null)
|
||||
image.setImageBitmap(bm);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
|
||||
image.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Uri url = Uri.parse("https://www.google.com/maps/dir/?api=1&destination="+lat+","+lng);
|
||||
Intent mapIntent = new Intent(Intent.ACTION_VIEW, url);
|
||||
// mapIntent.setPackage("com.google.android.apps.maps");
|
||||
startActivity(mapIntent);
|
||||
}
|
||||
});
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
public static Bitmap getBitmapFromURL(String src) {
|
||||
try {
|
||||
URL url = new URL(src);
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setDoInput(true);
|
||||
connection.connect();
|
||||
InputStream input = connection.getInputStream();
|
||||
Bitmap myBitmap = BitmapFactory.decodeStream(input);
|
||||
return myBitmap;
|
||||
} catch (IOException e) {
|
||||
// Log exception
|
||||
return null;
|
||||
} catch (RuntimeException ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getActivity().setTitle(getString(R.string.title_mn_account));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TableRow
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/no"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:gravity="center_horizontal"/>
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/timelineLine" />
|
||||
<TextView
|
||||
android:id="@+id/activityDate"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:gravity="center_horizontal"/>
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/timelineLine" />
|
||||
<TextView
|
||||
android:id="@+id/action"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:gravity="center_horizontal"/>
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/timelineLine" />
|
||||
<TextView
|
||||
android:id="@+id/collectorName"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:gravity="center_horizontal"/>
|
||||
</TableRow>
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright 2012 Kevin Gaudin
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.acra;
|
||||
|
||||
/**
|
||||
* Responsible for determining the state of a Crash Report based on its file name.
|
||||
* <p/>
|
||||
*
|
||||
* @author William Ferguson
|
||||
* @since 4.3.0
|
||||
*/
|
||||
final class CrashReportFileNameParser {
|
||||
|
||||
/**
|
||||
* Guess that a report is silent from its file name.
|
||||
*
|
||||
* @param reportFileName Name of the report to check whether it should be sent silently.
|
||||
* @return True if the report has been declared explicitly silent using {@link ErrorReporter#handleSilentException(Throwable)}.
|
||||
*/
|
||||
public boolean isSilent(String reportFileName) {
|
||||
return reportFileName.contains(ACRAConstants.SILENT_SUFFIX);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the report is considered as approved.
|
||||
* <p>
|
||||
* This includes:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>Reports which were pending when the user agreed to send a report in the NOTIFICATION mode Dialog.</li>
|
||||
* <li>Explicit silent reports</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param reportFileName Name of report to check whether it is approved to be sent.
|
||||
* @return True if a report can be sent.
|
||||
*/
|
||||
public boolean isApproved(String reportFileName) {
|
||||
return isSilent(reportFileName) || reportFileName.contains(ACRAConstants.APPROVED_SUFFIX);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.adins.mss.base.todolist;
|
||||
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RequestOneTaskBean extends MssRequestType {
|
||||
@SerializedName("schemeId")
|
||||
String schemeId;
|
||||
|
||||
public String getSchemeId() {
|
||||
return schemeId;
|
||||
}
|
||||
|
||||
public void setSchemeId(String schemeId) {
|
||||
this.schemeId = schemeId;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="70dp" >
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/installment_schedule"
|
||||
android:textColor="#46F"
|
||||
android:textStyle="bold"
|
||||
android:textSize="22dp"/>
|
||||
|
||||
<ExpandableListView android:id="@+id/list"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:groupIndicator="@null" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="bottom">
|
||||
<ImageButton android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_save"/>
|
||||
<TextView android:id="@+id/txtSave"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnSave"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#FED300"
|
||||
android:textSize="16dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
Loading…
Add table
Add a link
Reference in a new issue