add project adins

This commit is contained in:
Alfrid Sanjaya Leo Putra 2024-07-25 14:44:22 +07:00
commit f8f85d679d
5299 changed files with 625430 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_activated="true" android:color="@color/tv_white"/>
<item android:state_pressed="true" android:color="@color/tv_normal" /> <!-- pressed -->
<item android:color="@color/tv_darker" /> <!-- default -->
</selector>

View file

@ -0,0 +1,128 @@
package com.adins.mss.foundation.http;
import com.adins.mss.base.GlobalData;
import com.adins.mss.base.crashlytics.FireCrash;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* Model containing device data for audit purposes.
*
* @author sumatris
*/
public class AuditDataType implements Serializable {
/**
* uuid of a user
*/
@SerializedName("callerId")
protected String callerId;
@SerializedName("os")
protected String os;
@SerializedName("osVersion")
protected String osVersion;
@SerializedName("deviceId")
protected String deviceId;
@SerializedName("deviceModel")
protected String deviceModel;
@SerializedName("application")
protected String application;
@SerializedName("applicationVersion")
protected String applicationVersion;
@SerializedName("locale")
protected String locale;
@SerializedName("androidId")
protected String androidId;
public String getLocale() {
return locale;
}
public void setLocale(String locale) {
this.locale = locale;
}
public String getCallerId() {
return callerId;
}
public void setCallerId(String callerId) {
String loginId = "";
try {
loginId = GlobalData.getSharedGlobalData().getTenant();
} catch (Exception e) {
FireCrash.log(e);
}
this.callerId = callerId + getTenantId(loginId);
}
private String getTenantId(String loginId) {
int index = loginId.indexOf("@");
String result = "";
if (index != -1) {
result = loginId.substring(index, loginId.length());
}
return result;
}
public String getOs() {
return os;
}
public void setOs(String os) {
this.os = os;
}
public String getOsVersion() {
return osVersion;
}
public void setOsVersion(String osVersion) {
this.osVersion = osVersion;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getDeviceModel() {
return deviceModel;
}
public void setDeviceModel(String deviceModel) {
this.deviceModel = deviceModel;
}
public String getApplication() {
return application;
}
public void setApplication(String application) {
this.application = application;
}
public String getApplicationVersion() {
return applicationVersion;
}
public void setApplicationVersion(String applicationVersion) {
this.applicationVersion = applicationVersion;
}
public String getAndroidId() {
return androidId;
}
public void setAndroidId(String androidId) {
this.androidId = androidId;
}
}

View file

@ -0,0 +1,66 @@
/*
* jets3t : Java Extra-Tasty S3 Toolkit (for Amazon S3 online storage service)
* This is a java.net project, see https://jets3t.dev.java.net/
*
* Copyright 2006 James Murty
*
* 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 com.adins.mss.foundation.image;
import java.text.DecimalFormat;
import java.text.NumberFormat;
/**
* Formats numeric byte values into human-readable strings.
*
* @author James Murty
*/
public class ByteFormatter {
private static String gigabyteSuffix = " Gigabytes";
private static String megabyteSuffix = " Megabytes";
private static String kilobyteSuffix = " Kilobytes";
private static String byteSuffix = " Bytes";
private static NumberFormat nf = new DecimalFormat("#,###.##");
;
/**
* Converts a byte size into a human-readable string, such as "1.43 MB" or "27 KB".
* The values used are based on powers of 1024, ie 1 KB = 1024 bytes, not 1000 bytes.
*
* @param byteSize the byte size of some item
* @return a human-readable description of the byte size
*/
public static String formatByteSize(long byteSize) {
String result = null;
try {
if (byteSize > Math.pow(1024, 3)) {
// Report gigabytes
result = nf.format(new Double(byteSize / Math.pow(1024, 3))) + gigabyteSuffix;
} else if (byteSize > Math.pow(1024, 2)) {
// Report megabytes
result = nf.format(new Double(byteSize / Math.pow(1024, 2))) + megabyteSuffix;
} else if (byteSize > 1024) {
// Report kilobytes
result = nf.format(new Double(byteSize / Math.pow(1024, 1))) + kilobyteSuffix;
} else if (byteSize >= 0) {
// Report bytes
result = byteSize + byteSuffix;
}
} catch (NumberFormatException e) {
return byteSize + byteSuffix;
}
return result;
}
}

View file

@ -0,0 +1,16 @@
<?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:padding="8dp"
android:background="@color/gradient_start">
<TextView
android:id="@+id/itemText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="24sp"
android:textColor="#FFF"
android:text="@string/dummy_text">
</TextView>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB