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
|
@ -0,0 +1,27 @@
|
|||
package com.adins.mss.odr.model;
|
||||
|
||||
import com.adins.mss.odr.model.Order;
|
||||
|
||||
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,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/button_background"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/fontColorDarkGrey"
|
||||
android:text="@string/btnOpportunities"
|
||||
android:id="@+id/lblListHeader"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
|
@ -0,0 +1,40 @@
|
|||
package com.adins.mss.foundation.sync;
|
||||
|
||||
import com.adins.mss.foundation.sync.Synchronize.SynchronizeScheme;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Default scheme with basic table synchronization
|
||||
*
|
||||
* @author glen.iglesias
|
||||
* @see SynchronizeScheme
|
||||
*/
|
||||
public class DefaultSynchronizeScheme implements SynchronizeScheme, BackgroundSynchronize.SynchronizeScheme {
|
||||
|
||||
public DefaultSynchronizeScheme() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SynchronizeItem> getSynchronizeItemList() {
|
||||
List<SynchronizeItem> list = new ArrayList<SynchronizeItem>();
|
||||
|
||||
//init default SynchronizeItems and add to list
|
||||
list.add(new SynchronizeItem("Test", "Test"));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertToDb(String json, String syncItemId) {
|
||||
|
||||
if ("".equals(syncItemId)) {
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.adins.mss.coll.tool;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
|
||||
public class Constants {
|
||||
public static final int START_DATE_DIALOG_ID=0;
|
||||
public static final int END_DATE_DIALOG_ID=1;
|
||||
public static final String KEY_START_DATE="start date";
|
||||
public static final String KEY_END_DATE="end date";
|
||||
public static final String KEY_DATE="date";
|
||||
public static final String KEY_BUND_BATCHID="BATCHID";
|
||||
public static final double EARTH_RADIUS = 6378.1370;
|
||||
|
||||
public double GetDistance(LatLng start, LatLng finish){
|
||||
double distance=0;
|
||||
|
||||
double lat1=start.latitude;
|
||||
double lng1=start.longitude;
|
||||
double lat2=finish.latitude;
|
||||
double lng2=finish.longitude;
|
||||
|
||||
double deltaLat=Math.toRadians(lat2-lat1);
|
||||
double deltaLng=Math.toRadians(lng2-lng1);
|
||||
lat1=Math.toRadians(lat1);
|
||||
lat2=Math.toRadians(lat2);
|
||||
|
||||
double axis=Math.sin(deltaLat/2)*Math.sin(deltaLat/2)+
|
||||
Math.cos(lat1)*Math.cos(lat2)*Math.sin(deltaLng/2)*Math.sin(deltaLng/2);
|
||||
|
||||
distance = EARTH_RADIUS* (2*Math.atan2(Math.sqrt(axis), Math.sqrt(1-axis)));
|
||||
DecimalFormat df=new DecimalFormat("#.###");
|
||||
|
||||
return distance;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_grayscale">
|
||||
<View
|
||||
android:id="@+id/actionbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/actionbar_background"/>
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="10dp">
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<EditText android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/currentPassword"
|
||||
android:hint="@string/lblCurrentPassword"
|
||||
android:inputType="textPassword"/>
|
||||
<EditText android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/newPassword"
|
||||
android:hint="@string/lblNewPassword"
|
||||
android:layout_marginTop="12dp"
|
||||
android:inputType="textPassword"/>
|
||||
<EditText android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/retypePassword"
|
||||
android:hint="@string/hintRetypePassword"
|
||||
android:layout_marginTop="12dp"
|
||||
android:inputType="textPassword"/>
|
||||
<Button android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/mnChangePassword"
|
||||
android:layout_marginTop="12dp"
|
||||
android:id="@+id/changePassword">
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
|
@ -0,0 +1,88 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion '29.0.2'
|
||||
android.packageBuildConfig = false
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 30
|
||||
versionCode 2
|
||||
versionName "1.0"
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
shrinkResources false
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
dexOptions {
|
||||
javaMaxHeapSize "5g"
|
||||
}
|
||||
testOptions {
|
||||
unitTests.returnDefaultValues = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api fileTree(include: '*.jar', dir: 'libs')
|
||||
api group: 'com.zebra', name: 'android-sdk', version: '1.0'
|
||||
api 'com.google.android.gms:play-services-location:17.1.0'
|
||||
api 'com.google.android.gms:play-services-maps:17.0.0'
|
||||
api 'com.google.firebase:firebase-messaging:20.2.4'
|
||||
api 'com.google.firebase:firebase-core:17.5.0'
|
||||
api 'com.google.firebase:firebase-storage:19.2.0'
|
||||
api 'com.google.firebase:firebase-database:19.4.0'
|
||||
api 'com.google.firebase:firebase-perf:19.1.1'
|
||||
api 'com.google.firebase:firebase-analytics:17.5.0'
|
||||
api 'com.google.firebase:firebase-crashlytics:17.2.1'
|
||||
|
||||
api 'androidx.appcompat:appcompat:1.0.0'
|
||||
// implementation 'com.android.support:support-annotations:28.0.0'
|
||||
api 'com.google.android.material:material:1.0.0'
|
||||
api 'androidx.recyclerview:recyclerview:1.0.0'
|
||||
api 'androidx.cardview:cardview:1.0.0'
|
||||
api 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
api 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
api 'jp.wasabeef:recyclerview-animators:2.2.7'
|
||||
api 'androidx.multidex:multidex:2.0.0'
|
||||
api 'de.greenrobot:eventbus:2.4.0'
|
||||
api 'org.greenrobot:greendao-encryption:2.2.2'
|
||||
api 'net.zetetic:android-database-sqlcipher:4.2.0'
|
||||
api 'de.hdodenhof:circleimageview:2.2.0'
|
||||
|
||||
api files('libs/PaxNeptuneLiteApi_V2.01.00_20171025.jar')
|
||||
api files('libs/PaxNeptuneApi_V1.00.01_20161130.jar')
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
testImplementation 'junit:junit:4.12'
|
||||
api(name:'material-showcase', ext:'aar')
|
||||
// Espresso UI Testing
|
||||
// androidtestImplementation "com.android.support.test.espresso:espresso-core:3.0.2"
|
||||
// androidtestImplementation 'com.android.support.test:rules:1.0.2'
|
||||
// androidtestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
|
||||
testImplementation 'org.mockito:mockito-core:2.7.22'
|
||||
testImplementation 'org.powermock:powermock-core:1.7.0RC2'
|
||||
testImplementation 'org.powermock:powermock-module-junit4:1.7.0RC2'
|
||||
testImplementation 'org.powermock:powermock-api-mockito2:1.7.0RC2'
|
||||
androidTestImplementation 'org.mockito:mockito-android:2.7.22'
|
||||
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
|
||||
|
||||
}
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'kotlin-android-extensions'
|
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,71 @@
|
|||
package com.adins.mss.base.checkin.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.adins.mss.base.R;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.LocationInfo;
|
||||
import com.adins.mss.foundation.formatter.Formatter;
|
||||
|
||||
|
||||
public class CheckInResultDialog extends DialogFragment {
|
||||
|
||||
private TextView title;
|
||||
private TextView time;
|
||||
private TextView date;
|
||||
|
||||
public CheckInResultDialog() {
|
||||
// Empty constructor required for DialogFragment
|
||||
setStyle(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme_Holo_Dialog_MinWidth);
|
||||
}
|
||||
|
||||
public static CheckInResultDialog newInstance(String title, String message, LocationInfo locationInfo) {
|
||||
CheckInResultDialog frag = new CheckInResultDialog();
|
||||
String time = Formatter.formatDate(locationInfo.getHandset_time(), Global.TIME_STR_FORMAT);
|
||||
String date = Formatter.formatDate(locationInfo.getHandset_time(), Global.DATE_STR_FORMAT3);
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putString("title", title);
|
||||
args.putString("message", message);
|
||||
args.putString("time", time);
|
||||
args.putString("date", date);
|
||||
frag.setArguments(args);
|
||||
return frag;
|
||||
}
|
||||
|
||||
public static CheckInResultDialog newInstance(String title, LocationInfo locationInfo) {
|
||||
CheckInResultDialog frag = new CheckInResultDialog();
|
||||
String time = Formatter.formatDate(locationInfo.getHandset_time(), Global.TIME_STR_FORMAT);
|
||||
String date = Formatter.formatDate(locationInfo.getHandset_time(), Global.DATE_STR_FORMAT3);
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putString("title", title);
|
||||
args.putString("time", time);
|
||||
args.putString("date", date);
|
||||
frag.setArguments(args);
|
||||
return frag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.dialog_absent_layout, container);
|
||||
title = (TextView) view.findViewById(R.id.lbl_title);
|
||||
time = (TextView) view.findViewById(R.id.txt_time);
|
||||
date = (TextView) view.findViewById(R.id.txt_date);
|
||||
String mtitle = getArguments().getString("title");
|
||||
String mTime = getArguments().getString("time");
|
||||
String mDate = getArguments().getString("date");
|
||||
|
||||
title.setText(mtitle);
|
||||
time.setText(mTime);
|
||||
date.setText(mDate);
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue