mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-30 21:04:16 +00:00
add project adins
This commit is contained in:
parent
ad06ac5505
commit
f8f85d679d
5299 changed files with 625430 additions and 0 deletions
Binary file not shown.
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@color/fontColorWhite"
|
||||
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
|
||||
</vector>
|
|
@ -0,0 +1,154 @@
|
|||
package com.adins.mss.odr;
|
||||
|
||||
import org.acra.ACRA;
|
||||
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.foundation.UserHelp.UserHelp;
|
||||
import com.adins.mss.odr.reassignment.OrderReassignmentResult;
|
||||
import com.adins.mss.odr.update.ResultUpdateActivity;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import static com.adins.mss.constant.Global.SHOW_USERHELP_DELAY_DEFAULT;
|
||||
|
||||
public class OrderFilterActivity extends CheckOrderActivity{
|
||||
private int taskType;
|
||||
private Spinner cbSearchByStatus;
|
||||
private String[] contentStatusFilter;
|
||||
private TextView labelSearchByStatus;
|
||||
private RelativeLayout layoutFilterByStatus;
|
||||
private Bundle mArguments;
|
||||
private LinearLayout container;
|
||||
private FirebaseAnalytics screenName;
|
||||
// private View view;
|
||||
public OrderFilterActivity() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context activity) {
|
||||
super.onAttach(activity);
|
||||
setHasOptionsMenu(true);
|
||||
ACRA.getErrorReporter().putCustomData("LAST_CLASS_ACCESSED", getClass().getSimpleName());
|
||||
mArguments = getArguments();
|
||||
taskType = mArguments.getInt(Global.BUND_KEY_TASK_TYPE, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
screenName = FirebaseAnalytics.getInstance(getActivity());
|
||||
// if(taskType==Global.TASK_CANCEL_ORDER){
|
||||
// addStatusFilter();
|
||||
// }
|
||||
|
||||
this.container = view.findViewById(R.id.container);
|
||||
this.container.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if(!UserHelp.isActive)
|
||||
UserHelp.showAllUserHelp(OrderFilterActivity.this.getActivity(),OrderFilterActivity.this.getClass().getSimpleName());
|
||||
}
|
||||
}, SHOW_USERHELP_DELAY_DEFAULT);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
private void addStatusFilter() {
|
||||
labelSearchByStatus = (TextView)view.findViewById(R.id.lblSearchByStatus);
|
||||
cbSearchByStatus = (Spinner)view.findViewById(R.id.cbSearcrByStatus);
|
||||
layoutFilterByStatus = (RelativeLayout)view.findViewById(R.id.filterByStatus);
|
||||
labelSearchByStatus.setVisibility(View.VISIBLE);
|
||||
layoutFilterByStatus.setVisibility(View.VISIBLE);
|
||||
ArrayAdapter<CharSequence> adapter=ArrayAdapter.createFromResource
|
||||
(getActivity(), R.array.cbSearchByStatus,R.layout.spinner_style);
|
||||
cbSearchByStatus.setAdapter(adapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Intent getNextActivityIntent() {
|
||||
Intent intent =null;
|
||||
if(taskType==Global.TASK_CANCEL_ORDER){
|
||||
intent = new Intent(getActivity(), ResultUpdateActivity.class);
|
||||
intent.putExtra(Global.BUND_KEY_TASK_TYPE, taskType);
|
||||
// int selectedItemPosition = cbSearchByStatus.getSelectedItemPosition();
|
||||
// String keySearchBy = "";
|
||||
// if(0==selectedItemPosition){
|
||||
// keySearchBy = "ALL";
|
||||
// }else if(1==selectedItemPosition){
|
||||
// keySearchBy = "OnSurvey";
|
||||
// }else if(2==selectedItemPosition){
|
||||
// keySearchBy = "OnCA";
|
||||
// }
|
||||
//
|
||||
// intent.putExtra("status", keySearchBy);
|
||||
}else if(taskType==Global.TASK_ORDER_REASSIGNMENT){
|
||||
intent = new Intent(getActivity(), OrderReassignmentResult.class);
|
||||
intent.putExtra(Global.BUND_KEY_TASK_TYPE, taskType);
|
||||
}
|
||||
|
||||
return intent;
|
||||
}
|
||||
@Override
|
||||
public void onResume(){
|
||||
super.onResume();
|
||||
// getActivity().getActionBar().removeAllTabs();
|
||||
if(taskType==Global.TASK_CANCEL_ORDER){
|
||||
getActivity().setTitle(getString(R.string.title_mn_cancelorder));
|
||||
screenName.setCurrentScreen(getActivity(), getString(R.string.screen_name_cancel_order), null);
|
||||
disableCheckOrderBtn();
|
||||
}
|
||||
else if(taskType==Global.TASK_ORDER_REASSIGNMENT){
|
||||
//Set Firebase screen name
|
||||
screenName.setCurrentScreen(getActivity(), getString(R.string.screen_name_order_reassignment), null);
|
||||
getActivity().setTitle(getString(R.string.title_mn_orderreassign));
|
||||
}
|
||||
// getActivity().getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
|
||||
if(item.getItemId() == R.id.mnGuide){
|
||||
if(!Global.BACKPRESS_RESTRICTION) {
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!UserHelp.isActive)
|
||||
UserHelp.showAllUserHelp(OrderFilterActivity.this.getActivity(), OrderFilterActivity.this.getClass().getSimpleName());
|
||||
}
|
||||
}, SHOW_USERHELP_DELAY_DEFAULT);
|
||||
container.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
if (!UserHelp.isActive)
|
||||
UserHelp.showAllUserHelp(OrderFilterActivity.this.getActivity(), OrderFilterActivity.this.getClass().getSimpleName());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="8dp"
|
||||
android:id="@+id/itemBase"
|
||||
android:background="@color/tv_gray_light">
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<TextView android:layout_width="100dp" android:layout_height="wrap_content"
|
||||
android:id="@+id/itemLabel"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:text="@string/divider_colon"/>
|
||||
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||
android:id="@+id/itemValue"
|
||||
android:gravity="right"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
|
@ -0,0 +1,20 @@
|
|||
package com.adins.mss.foundation.sync.api;
|
||||
|
||||
import com.adins.mss.dao.Lookup;
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SynchronizeResponseLookup extends MssResponseType {
|
||||
@SerializedName("listSync")
|
||||
private List<Lookup> listSync;
|
||||
|
||||
public List<Lookup> getListSync() {
|
||||
return listSync;
|
||||
}
|
||||
|
||||
public void setListSync(List<Lookup> listSync) {
|
||||
this.listSync = listSync;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false"
|
||||
android:bottom="2dp"
|
||||
android:top="-2dp"
|
||||
android:left="-2dp"
|
||||
android:right="-2dp">
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="@color/disabledFontColor" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="true"
|
||||
android:bottom="2dp"
|
||||
android:top="-2dp"
|
||||
android:left="-2dp"
|
||||
android:right="-2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/fontColor" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -0,0 +1,170 @@
|
|||
package com.adins.libs.nineoldandroids.animation;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import com.adins.libs.nineoldandroids.util.FloatProperty;
|
||||
import com.adins.libs.nineoldandroids.util.IntProperty;
|
||||
import com.adins.libs.nineoldandroids.util.Property;
|
||||
import com.adins.libs.nineoldandroids.view.animation.AnimatorProxy;
|
||||
|
||||
final class PreHoneycombCompat {
|
||||
static Property<View, Float> ALPHA = new FloatProperty<View>("alpha") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setAlpha(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getAlpha();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> PIVOT_X = new FloatProperty<View>("pivotX") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setPivotX(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getPivotX();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> PIVOT_Y = new FloatProperty<View>("pivotY") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setPivotY(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getPivotY();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> TRANSLATION_X = new FloatProperty<View>("translationX") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setTranslationX(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getTranslationX();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> TRANSLATION_Y = new FloatProperty<View>("translationY") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setTranslationY(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getTranslationY();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> ROTATION = new FloatProperty<View>("rotation") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setRotation(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getRotation();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> ROTATION_X = new FloatProperty<View>("rotationX") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setRotationX(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getRotationX();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> ROTATION_Y = new FloatProperty<View>("rotationY") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setRotationY(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getRotationY();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> SCALE_X = new FloatProperty<View>("scaleX") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setScaleX(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getScaleX();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> SCALE_Y = new FloatProperty<View>("scaleY") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setScaleY(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getScaleY();
|
||||
}
|
||||
};
|
||||
static Property<View, Integer> SCROLL_X = new IntProperty<View>("scrollX") {
|
||||
@Override
|
||||
public void setValue(View object, int value) {
|
||||
AnimatorProxy.wrap(object).setScrollX(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer get(View object) {
|
||||
return AnimatorProxy.wrap(object).getScrollX();
|
||||
}
|
||||
};
|
||||
static Property<View, Integer> SCROLL_Y = new IntProperty<View>("scrollY") {
|
||||
@Override
|
||||
public void setValue(View object, int value) {
|
||||
AnimatorProxy.wrap(object).setScrollY(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer get(View object) {
|
||||
return AnimatorProxy.wrap(object).getScrollY();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> X = new FloatProperty<View>("x") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setX(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getX();
|
||||
}
|
||||
};
|
||||
static Property<View, Float> Y = new FloatProperty<View>("y") {
|
||||
@Override
|
||||
public void setValue(View object, float value) {
|
||||
AnimatorProxy.wrap(object).setY(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(View object) {
|
||||
return AnimatorProxy.wrap(object).getY();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//No instances
|
||||
private PreHoneycombCompat() {
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
|
@ -0,0 +1,74 @@
|
|||
package com.adins.mss.foundation.camera2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.R;
|
||||
import com.adins.mss.base.util.LocaleHelper;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by ahmadkamilalmasyhur on 25/01/2018.
|
||||
*/
|
||||
|
||||
public class Camera2BasicRealActivity extends Activity {
|
||||
public static final String PICTURE_WIDTH = "picture_width";
|
||||
public static final String PICTURE_HEIGHT = "picture_height";
|
||||
public static final String PICTURE_QUALITY = "picture_quality";
|
||||
public static final String PICTURE_URI = "picture_path";
|
||||
|
||||
public static final int PICTURE_WIDHT_DEF = 1024;
|
||||
public static final int PICTURE_HEIGHT_DEF = 768;
|
||||
public static final int PICTURE_QUALITY_DEF = 70;
|
||||
|
||||
private static int width;
|
||||
private static int height;
|
||||
private static int quality;
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_camera2);
|
||||
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
|
||||
if (getIntent().getExtras() != null) {
|
||||
width = getIntent().getExtras().getInt(PICTURE_WIDTH);
|
||||
height = getIntent().getExtras().getInt(PICTURE_HEIGHT);
|
||||
quality = getIntent().getExtras().getInt(PICTURE_QUALITY);
|
||||
}
|
||||
|
||||
if (width <= 0) width = PICTURE_WIDHT_DEF;
|
||||
if (height <= 0) height = PICTURE_HEIGHT_DEF;
|
||||
if (quality <= 0) quality = PICTURE_QUALITY_DEF;
|
||||
|
||||
Camera2BasicActivity camera2BasicActivity = Camera2BasicActivity.newInstance();
|
||||
camera2BasicActivity.setArguments(bundle);
|
||||
|
||||
if (null == savedInstanceState) {
|
||||
getFragmentManager().beginTransaction()
|
||||
.replace(R.id.container, camera2BasicActivity)
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void attachBaseContext(Context newBase) {
|
||||
Context context = newBase;
|
||||
Locale locale;
|
||||
try{
|
||||
locale = new Locale(GlobalData.getSharedGlobalData().getLocale());
|
||||
context = LocaleHelper.wrap(newBase, locale);
|
||||
} catch (Exception e) {
|
||||
locale = new Locale(LocaleHelper.ENGLSIH);
|
||||
context = LocaleHelper.wrap(newBase, locale);
|
||||
} finally {
|
||||
super.attachBaseContext(context);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue