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,46 @@
|
|||
package com.adins.mss.foundation.print.rv;
|
||||
|
||||
import com.adins.mss.base.util.GsonHelper;
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by angga.permadi on 4/20/2016.
|
||||
*/
|
||||
public class RVNumberResponse extends MssResponseType {
|
||||
@SerializedName("reqCode")
|
||||
private int reqCode;
|
||||
@SerializedName("errorMessage")
|
||||
private String errorMessage;
|
||||
@SerializedName("errorCode")
|
||||
private String errorCode;
|
||||
|
||||
public int getReqCode() {
|
||||
return reqCode;
|
||||
}
|
||||
|
||||
public void setReqCode(int reqCode) {
|
||||
this.reqCode = reqCode;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public String getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
public void setErrorCode(String errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return GsonHelper.toJson(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package com.adins.mss.base;
|
||||
|
||||
import android.content.ComponentCallbacks2;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
import com.adins.mss.base.crashlytics.FireCrash;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by gigin.ginanjar on 25/02/2016.
|
||||
*/
|
||||
public abstract class AppContext extends MultiDexApplication {
|
||||
protected static Context context = null;
|
||||
protected static List<IMemoryInfo> memInfoList = new ArrayList<AppContext.IMemoryInfo>();
|
||||
protected static AppContext instance;
|
||||
private String versionName;
|
||||
private int versionCode;
|
||||
|
||||
public static AppContext getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static Context getAppContext() {
|
||||
return AppContext.context;
|
||||
}
|
||||
|
||||
public static void registerMemoryListener(IMemoryInfo implementor) {
|
||||
memInfoList.add(implementor);
|
||||
}
|
||||
|
||||
public static void unregisterMemoryListener(IMemoryInfo implementor) {
|
||||
memInfoList.remove(implementor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrimMemory(int level) {
|
||||
super.onTrimMemory(level);
|
||||
if (level >= ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW) {
|
||||
try {
|
||||
// Activity at the front will get earliest than activity at the
|
||||
// back
|
||||
for (int i = memInfoList.size() - 1; i >= 0; i--) {
|
||||
try {
|
||||
memInfoList.get(i).goodTimeToReleaseMemory();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
// ACRA.init(this);
|
||||
super.onCreate();
|
||||
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public String getVersionName() {
|
||||
if (versionName == null || versionName.isEmpty()) {
|
||||
try {
|
||||
versionName = retrieveVersionName();
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return versionName;
|
||||
}
|
||||
|
||||
private String retrieveVersionName() throws PackageManager.NameNotFoundException {
|
||||
return getPackageManager().getPackageInfo(
|
||||
getPackageName(), 0).versionName;
|
||||
}
|
||||
|
||||
public int getVersionCode() {
|
||||
if (versionCode == 0) {
|
||||
try {
|
||||
versionCode = retrieveVersionCode();
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return versionCode;
|
||||
}
|
||||
|
||||
private int retrieveVersionCode() throws PackageManager.NameNotFoundException {
|
||||
return getPackageManager().getPackageInfo(
|
||||
getPackageName(), 0).versionCode;
|
||||
}
|
||||
|
||||
public abstract Class getHomeClass();
|
||||
|
||||
public interface IMemoryInfo {
|
||||
void goodTimeToReleaseMemory();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
|
||||
<gradient
|
||||
android:startColor="#0ba0e9"
|
||||
android:endColor="#1e55c3"
|
||||
android:angle="270"
|
||||
/>
|
||||
<padding
|
||||
|
||||
android:left="5dp"
|
||||
android:top="5dp"
|
||||
android:right="5dp"
|
||||
android:bottom="5dp" />
|
||||
|
||||
|
||||
</selector>
|
Binary file not shown.
After Width: | Height: | Size: 7 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/custom_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:gravity="center"
|
||||
/>
|
Loading…
Add table
Add a link
Reference in a new issue