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,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<fragment
|
||||
android:id="@+id/mapTask"
|
||||
android:name="com.google.android.gms.maps.SupportMapFragment"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/latlongLocation"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="bottom"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#ff058fff"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="#ffffffff"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp" />
|
||||
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,273 @@
|
|||
package com.adins.mss.base.checkin.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.adins.mss.base.R;
|
||||
import com.adins.mss.base.checkin.CheckInLocationTask;
|
||||
import com.adins.mss.base.checkin.CheckInManager;
|
||||
import com.adins.mss.base.commons.CommonImpl;
|
||||
import com.adins.mss.base.commons.ViewInterface;
|
||||
import com.adins.mss.base.crashlytics.FireCrash;
|
||||
import com.adins.mss.base.errorhandler.ErrorMessageHandler;
|
||||
import com.adins.mss.base.errorhandler.IShowError;
|
||||
import com.adins.mss.base.timeline.Constants;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.LocationInfo;
|
||||
import com.adins.mss.foundation.UserHelp.UserHelp;
|
||||
import com.adins.mss.foundation.dialog.NiftyDialogBuilder;
|
||||
import com.google.android.gms.maps.CameraUpdateFactory;
|
||||
import com.google.android.gms.maps.GoogleMap;
|
||||
import com.google.android.gms.maps.OnMapReadyCallback;
|
||||
import com.google.android.gms.maps.SupportMapFragment;
|
||||
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||||
import com.google.android.gms.maps.model.CircleOptions;
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.google.android.gms.maps.model.Marker;
|
||||
import com.google.android.gms.maps.model.MarkerOptions;
|
||||
|
||||
import static com.adins.mss.constant.Global.SHOW_USERHELP_DELAY_DEFAULT;
|
||||
|
||||
/**
|
||||
* Created by kusnendi.muhamad on 31/07/2017.
|
||||
*/
|
||||
|
||||
public class CheckInView extends CommonImpl implements ViewInterface, View.OnClickListener, OnMapReadyCallback, IShowError {
|
||||
public static Context context;
|
||||
public static TextView AddressLocale;
|
||||
public static TextView AddressLine;
|
||||
public static LinearLayout descLayout;
|
||||
static GoogleMap mGoogleMap;
|
||||
static CheckInManager manager;
|
||||
static LocationInfo info;
|
||||
static LatLng latLng;
|
||||
private static View view;
|
||||
private static String[] address;
|
||||
public Activity activity;
|
||||
public Fragment fragment;
|
||||
ImageButton btnRefresh;
|
||||
private ErrorMessageHandler errorMessageHandler;
|
||||
|
||||
public CheckInView(Activity activity) {
|
||||
this.activity = activity;
|
||||
errorMessageHandler = new ErrorMessageHandler(this);
|
||||
}
|
||||
|
||||
public static void setLocation(String[] address) {
|
||||
try {
|
||||
descLayout.setVisibility(View.VISIBLE);
|
||||
AddressLocale.setText(address[0]);
|
||||
AddressLine.setText(address[1]);
|
||||
CheckInView.address = address;
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void setNewLocation() {
|
||||
info = manager.getNewLocation();
|
||||
manager.getAddressLocation(context, info);
|
||||
latLng = manager.getLatLng(info);
|
||||
int accuracy = info.getAccuracy();
|
||||
mGoogleMap.clear();
|
||||
mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));
|
||||
MarkerOptions markerOptions = new MarkerOptions();
|
||||
markerOptions.position(latLng);
|
||||
markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));
|
||||
mGoogleMap.addMarker(markerOptions);
|
||||
|
||||
if (accuracy != 0) {
|
||||
CircleOptions circleOptions = new CircleOptions()
|
||||
.center(latLng)
|
||||
.radius(accuracy)
|
||||
.fillColor(0x402196F3)
|
||||
.strokeColor(Color.TRANSPARENT)
|
||||
.strokeWidth(2);
|
||||
|
||||
mGoogleMap.addCircle(circleOptions);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish() {
|
||||
//EMPTY
|
||||
}
|
||||
|
||||
public void onAttach() {
|
||||
context = activity;
|
||||
try {
|
||||
manager = new CheckInManager(activity);
|
||||
info = manager.getLocationInfoCheckIn();
|
||||
manager.getAddressLocation(context, info);
|
||||
latLng = manager.getLatLng(info);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
public View layoutInflater(LayoutInflater inflater, ViewGroup container) {
|
||||
if (view != null) {
|
||||
ViewGroup parent = (ViewGroup) view.getParent();
|
||||
if (parent != null)
|
||||
parent.removeView(view);
|
||||
}
|
||||
|
||||
try {
|
||||
view = inflater.inflate(R.layout.checkin_layout, container, false);
|
||||
|
||||
AddressLocale = (TextView) view.findViewById(R.id.textLocalIn);
|
||||
AddressLine = (TextView) view.findViewById(R.id.textAddressIn);
|
||||
descLayout = (LinearLayout) view.findViewById(R.id.DescLayoutIn);
|
||||
btnRefresh = (ImageButton) view.findViewById(R.id.btnRefreshCIn);
|
||||
|
||||
btnRefresh.setOnClickListener(this);
|
||||
descLayout.setOnClickListener(this);
|
||||
SupportMapFragment supportMapFragment = (SupportMapFragment)
|
||||
fragment.getChildFragmentManager().findFragmentById(R.id.mapIn);
|
||||
|
||||
// Setting Google Map
|
||||
supportMapFragment.getMapAsync(this);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
|
||||
manager.updateLocationCheckin();
|
||||
Constants.inAbsent = true;
|
||||
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UserHelp.showAllUserHelp((Activity)view.getContext(),fragment.getClass().getSimpleName());
|
||||
}
|
||||
}, SHOW_USERHELP_DELAY_DEFAULT);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
//EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
if (checkPlayServices(activity)) {
|
||||
// Then we're good to go!
|
||||
}
|
||||
showGPSAlert(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
//EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu) {
|
||||
//EMPTY
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOptionsItemSelected(int id) {
|
||||
if(id == R.id.mnGuide && !Global.BACKPRESS_RESTRICTION){
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UserHelp.showAllUserHelp((Activity) view.getContext(), fragment.getClass().getSimpleName());
|
||||
}
|
||||
}, SHOW_USERHELP_DELAY_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id == R.id.btnRefreshCIn) {
|
||||
Animation a = AnimationUtils.loadAnimation(context, R.anim.icon_rotate);
|
||||
btnRefresh.startAnimation(a);
|
||||
manager.updateLocationCheckin();
|
||||
} else if (id == R.id.DescLayoutIn) {
|
||||
if (AddressLocale.getText().equals(context.getString(R.string.address_not_found)) || AddressLocale.getText().equals("")) {
|
||||
errorMessageHandler.processError(context.getString(R.string.error_capital)
|
||||
,context.getString(R.string.msgUnavailableAddress)
|
||||
, ErrorMessageHandler.DIALOG_TYPE);
|
||||
} else {
|
||||
try {
|
||||
CheckInLocationTask task = new CheckInLocationTask(context, context.getString(R.string.progressWait),
|
||||
context.getString(R.string.msgUnavaibleLocationCheckIn), info, address);
|
||||
task.execute();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
if (context != null) {
|
||||
errorMessageHandler.processError(context.getString(R.string.error_capital)
|
||||
,context.getString(R.string.msgUnavaibleLocationCheckIn)
|
||||
, ErrorMessageHandler.DIALOG_TYPE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapReady(GoogleMap googleMap) {
|
||||
mGoogleMap = googleMap;
|
||||
initializeMaps();
|
||||
}
|
||||
|
||||
private void initializeMaps() {
|
||||
try {
|
||||
try {
|
||||
mGoogleMap.clear();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));
|
||||
MarkerOptions markerOptions = new MarkerOptions();
|
||||
markerOptions.position(latLng);
|
||||
markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));
|
||||
Marker marker = mGoogleMap.addMarker(markerOptions);
|
||||
Log.d("marker_id",marker.getId());
|
||||
|
||||
int accuracy = info.getAccuracy();
|
||||
if (accuracy != 0) {
|
||||
CircleOptions circleOptions = new CircleOptions()
|
||||
.center(latLng)
|
||||
.radius(accuracy)
|
||||
.fillColor(0x402196F3)
|
||||
.strokeColor(Color.TRANSPARENT)
|
||||
.strokeWidth(2);
|
||||
|
||||
mGoogleMap.addCircle(circleOptions);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String errorSubject, String errorMsg, int notifType) {
|
||||
if(notifType == ErrorMessageHandler.DIALOG_TYPE){
|
||||
NiftyDialogBuilder dialogBuilder = NiftyDialogBuilder.getInstance(context);
|
||||
dialogBuilder.withTitle(errorSubject)
|
||||
.withMessage(errorMsg)
|
||||
.isCancelable(true)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.adins.mss.svy.reassignment;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by winy.firdasari on 20/01/2015.
|
||||
*/
|
||||
public class OrderChecking {
|
||||
public List<Order> orderList;
|
||||
|
||||
public OrderChecking(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<Order> getOrderList() {
|
||||
return orderList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setOrderList(List<Order> orderList) {
|
||||
this.orderList = orderList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
package com.adins.mss.base.fragments
|
||||
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.adins.mss.base.GlobalData
|
||||
import com.adins.mss.base.NewMainActivity
|
||||
import com.adins.mss.base.R
|
||||
import com.adins.mss.base.dialogfragments.SettingsDialog
|
||||
import com.adins.mss.constant.Global
|
||||
import com.adins.mss.constant.Global.SHOW_USERHELP_DELAY_DEFAULT
|
||||
import com.adins.mss.foundation.UserHelp.UserHelp
|
||||
import kotlinx.android.synthetic.main.fragment_setting.*
|
||||
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private const val ARG_PARAM1 = "param1"
|
||||
private const val ARG_PARAM2 = "param2"
|
||||
|
||||
/**
|
||||
* A simple [Fragment] subclass.
|
||||
*
|
||||
*/
|
||||
class SettingFragment : Fragment() {
|
||||
|
||||
private var mParam1: String? = null
|
||||
private var mParam2: String? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
if (arguments != null) {
|
||||
mParam1 = arguments?.getString(ARG_PARAM1)
|
||||
mParam2 = arguments?.getString(ARG_PARAM2)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?): View? {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_setting, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
mLanguages.setOnClickListener { languageSetting() }
|
||||
mPrinting.setOnClickListener { printSetting() }
|
||||
|
||||
|
||||
val appName = GlobalData.getSharedGlobalData().application
|
||||
if (appName.equals("MC")){
|
||||
mPrinting.visibility = View.VISIBLE
|
||||
}else{
|
||||
mPrinting.visibility = View.GONE
|
||||
}
|
||||
val handler = Handler()
|
||||
handler.postDelayed({
|
||||
UserHelp.showAllUserHelp(this@SettingFragment.getActivity(),
|
||||
this@SettingFragment.javaClass.getSimpleName())
|
||||
}, SHOW_USERHELP_DELAY_DEFAULT.toLong())
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
activity?.title = getString(R.string.title_mn_setting)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
if(item?.itemId == R.id.mnGuide){
|
||||
if(!Global.BACKPRESS_RESTRICTION) {
|
||||
val handler = Handler()
|
||||
handler.postDelayed({
|
||||
UserHelp.showAllUserHelp(this@SettingFragment.getActivity(),
|
||||
this@SettingFragment.javaClass.getSimpleName())
|
||||
}, SHOW_USERHELP_DELAY_DEFAULT.toLong())
|
||||
}
|
||||
}
|
||||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
||||
private fun languageSetting() {
|
||||
// MainMenuActivity.isFromSetting = true
|
||||
// val intent = Intent(context, SettingActivity::class.java)
|
||||
// startActivityForResult(intent, 199)
|
||||
val fragment = SettingsDialog()
|
||||
val transaction = NewMainActivity.fragmentManager.beginTransaction()
|
||||
// val transaction = MCMainMenuActivity.fragmentManager.beginTransaction()
|
||||
transaction.setCustomAnimations(R.anim.activity_open_translate, R.anim.activity_close_scale, R.anim.activity_open_scale, R.anim.activity_close_translate)
|
||||
transaction.replace(R.id.content_frame, fragment)
|
||||
transaction.addToBackStack(null)
|
||||
transaction.commit()
|
||||
}
|
||||
|
||||
private fun printSetting() {
|
||||
val fragment = PrintingServiceFragment()
|
||||
val transaction = NewMainActivity.fragmentManager.beginTransaction()
|
||||
// val transaction = MCMainMenuActivity.fragmentManager.beginTransaction()
|
||||
transaction.setCustomAnimations(R.anim.activity_open_translate, R.anim.activity_close_scale, R.anim.activity_open_scale, R.anim.activity_close_translate)
|
||||
transaction.replace(R.id.content_frame, fragment)
|
||||
transaction.addToBackStack(null)
|
||||
transaction.commit()
|
||||
}
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
setHasOptionsMenu(true)
|
||||
super.onAttach(context)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == 199) {
|
||||
activity?.recreate()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private val ARG_PARAM1 = "param1"
|
||||
private val ARG_PARAM2 = "param2"
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment SettingsFragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
fun newInstance(param1: String, param2: String): SettingFragment {
|
||||
val fragment = SettingFragment()
|
||||
val args = Bundle()
|
||||
args.putString(ARG_PARAM1, param1)
|
||||
args.putString(ARG_PARAM2, param2)
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package com.services.plantask;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.R;
|
||||
import com.adins.mss.base.todolist.todayplanrepository.IPlanTaskDataSource;
|
||||
import com.adins.mss.base.todolist.todayplanrepository.TodayPlanRepository;
|
||||
import com.services.AutoSendImageThread;
|
||||
|
||||
public class ChangePlanService extends Service implements IPlanTaskDataSource.Result<Boolean> {
|
||||
|
||||
private TodayPlanRepository todayPlanRepo;
|
||||
private final String CHANNEL_ID = "CHANGE_PLAN_CHANNEL";
|
||||
private final String CHANNEL_NAME = "Change Plans Notification";
|
||||
private final String CHANNEL_DESC = "Change Plans Notification";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
todayPlanRepo = GlobalData.getSharedGlobalData().getTodayPlanRepo();
|
||||
if(todayPlanRepo == null){
|
||||
todayPlanRepo = new TodayPlanRepository(getApplicationContext());
|
||||
}
|
||||
}
|
||||
|
||||
private Notification createNotif(){
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
int importance = NotificationManager.IMPORTANCE_DEFAULT;
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, importance);
|
||||
channel.setDescription(CHANNEL_DESC);
|
||||
NotificationManager notificationManager = getSystemService(NotificationManager.class);
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
|
||||
NotificationCompat.Builder notifBuilder = new NotificationCompat.Builder(this,CHANNEL_ID);
|
||||
notifBuilder.setSmallIcon(AutoSendImageThread.getNotificationUploadingIcon());
|
||||
String title = getString(R.string.auto_changeplan_title);
|
||||
String content = getString(R.string.auto_changeplan_content);
|
||||
notifBuilder.setContentTitle(title);
|
||||
notifBuilder.setContentText(content);
|
||||
notifBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(content));
|
||||
notifBuilder.setProgress(0,0,true);
|
||||
return notifBuilder.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
startForeground(53,createNotif());
|
||||
changePlan();
|
||||
return START_NOT_STICKY;
|
||||
}
|
||||
|
||||
private void changePlan(){
|
||||
String[] lastOffChangePlan = todayPlanRepo.getLastOffChangePlanInfo();
|
||||
String oldPlan = lastOffChangePlan[0];
|
||||
String newPlan = lastOffChangePlan[1];
|
||||
todayPlanRepo.changePlan(oldPlan,newPlan,this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResult(Boolean result) {
|
||||
stopForeground(true);
|
||||
stopSelf();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
stopForeground(true);
|
||||
stopSelf();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.adins.mss.foundation.UserHelp.Bean;
|
||||
|
||||
import com.adins.mss.foundation.UserHelp.Bean.Dummy.UserHelpGuideDummy;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UserHelpBean {
|
||||
@SerializedName("guide")
|
||||
private ArrayList<UserHelpGuide> guide;
|
||||
|
||||
@SerializedName("guideDummy")
|
||||
private ArrayList<UserHelpGuideDummy> guideDummy;
|
||||
|
||||
public ArrayList<UserHelpGuide> getGuide() {
|
||||
return guide;
|
||||
}
|
||||
|
||||
public void setGuide(ArrayList<UserHelpGuide> guide) {
|
||||
this.guide = guide;
|
||||
}
|
||||
|
||||
public ArrayList<UserHelpGuideDummy> getGuideDummy() {
|
||||
return guideDummy;
|
||||
}
|
||||
|
||||
public void setGuideDummy(ArrayList<UserHelpGuideDummy> guideDummy) {
|
||||
this.guideDummy = guideDummy;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.adins.mss.foundation.questiongenerator.form.QuestionView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/questionDigitalReceiptLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/questionDigitalReceiptLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0. label"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/questionDigitalReceiptAnswer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="0.1"
|
||||
android:editable="false"
|
||||
android:hint="@string/hintDigitalReceipt"
|
||||
android:padding="10dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@drawable/edit_text_selector" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGetDigitalReceipt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="0.1"
|
||||
android:background="@drawable/button_background"
|
||||
android:text="@string/btnDigitalReceipt"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/fontColorWhite" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.adins.mss.foundation.questiongenerator.form.QuestionView>
|
|
@ -0,0 +1,39 @@
|
|||
package com.adins.mss.base.loyalti.dailypointacquisition.contracts;
|
||||
|
||||
|
||||
import com.adins.mss.base.loyalti.BasePresenter;
|
||||
import com.adins.mss.base.loyalti.BaseView;
|
||||
import com.adins.mss.base.loyalti.model.GroupPointData;
|
||||
import com.adins.mss.base.loyalti.model.LoyaltyPointsRequest;
|
||||
import com.adins.mss.base.loyalti.model.PointDetail;
|
||||
import com.adins.mss.base.loyalti.model.RankDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DailyPointContract {
|
||||
interface View extends BaseView<Presenter> {
|
||||
void onDataReceived(float[][] pointDataSet, RankDetail[][] rankDataSet, List<PointDetail> pointDetailsDataSet);
|
||||
|
||||
void onGetDataFailed(String message);
|
||||
}
|
||||
|
||||
interface Presenter extends BasePresenter {
|
||||
void getDailyPointsData(LoyaltyPointsRequest reqData);
|
||||
|
||||
float getAvgPoint();
|
||||
|
||||
int getMaxPoint();
|
||||
|
||||
int getTotalPoints();
|
||||
|
||||
int getCurrentDay();
|
||||
|
||||
String[] getDays();
|
||||
|
||||
GroupPointData getPointDataAt(int monthIdx);
|
||||
|
||||
List<PointDetail> getPointDetails();
|
||||
|
||||
List<RankDetail> getRanks();
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Loading…
Add table
Add a link
Reference in a new issue