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

View file

@ -0,0 +1,153 @@
package com.soundcloud.android.crop;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.MediaStore;
import androidx.fragment.app.Fragment;
import android.widget.Toast;
import com.adins.mss.base.R;
import com.soundcloud.android.crop.util.VisibleForTesting;
/**
* Builder for crop Intents and utils for handling result
*/
public class Crop {
public static final int REQUEST_CROP = 6709;
public static final int REQUEST_PICK = 9162;
public static final int RESULT_ERROR = 404;
private Intent cropIntent;
/**
* Create a crop Intent builder with source image
*
* @param source Source image URI
*/
public Crop(Uri source) {
cropIntent = new Intent();
cropIntent.setData(source);
}
/**
* Retrieve URI for cropped image, as set in the Intent builder
*
* @param result Output Image URI
*/
public static Uri getOutput(Intent result) {
return result.getParcelableExtra(MediaStore.EXTRA_OUTPUT);
}
/**
* Retrieve error that caused crop to fail
*
* @param result Result Intent
* @return Throwable handled in CropImageActivity
*/
public static Throwable getError(Intent result) {
return (Throwable) result.getSerializableExtra(Extra.ERROR);
}
/**
* Utility method that starts an image picker since that often precedes a crop
*
* @param activity Activity that will receive result
*/
public static void pickImage(Activity activity) {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT).setType("image/*");
try {
activity.startActivityForResult(intent, REQUEST_PICK);
} catch (ActivityNotFoundException e) {
Toast.makeText(activity, R.string.crop__pick_error, Toast.LENGTH_SHORT).show();
}
}
public static void pickImage(Context context, Fragment fragment) {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT).setType("image/*");
try {
fragment.startActivityForResult(intent, REQUEST_PICK);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, R.string.crop__pick_error, Toast.LENGTH_SHORT).show();
}
}
/**
* Set output URI where the cropped image will be saved
*
* @param output Output image URI
*/
public Crop output(Uri output) {
cropIntent.putExtra(MediaStore.EXTRA_OUTPUT, output);
return this;
}
/**
* Set fixed aspect ratio for crop area
*
* @param x Aspect X
* @param y Aspect Y
*/
public Crop withAspect(int x, int y) {
cropIntent.putExtra(Extra.ASPECT_X, x);
cropIntent.putExtra(Extra.ASPECT_Y, y);
return this;
}
/**
* Crop area with fixed 1:1 aspect ratio
*/
public Crop asSquare() {
cropIntent.putExtra(Extra.ASPECT_X, 1);
cropIntent.putExtra(Extra.ASPECT_Y, 1);
return this;
}
/**
* Set maximum crop size
*
* @param width Max width
* @param height Max height
*/
public Crop withMaxSize(int width, int height) {
cropIntent.putExtra(Extra.MAX_X, width);
cropIntent.putExtra(Extra.MAX_Y, height);
return this;
}
/**
* Send the crop Intent!
*
* @param activity Activity that will receive result
*/
public void start(Activity activity) {
activity.startActivityForResult(getIntent(activity), REQUEST_CROP);
}
/**
* Send the crop Intent!
*
* @param context Context
* @param fragment Fragment that will receive result
*/
public void start(Context context, Fragment fragment) {
fragment.startActivityForResult(getIntent(context), REQUEST_CROP);
}
@VisibleForTesting
Intent getIntent(Context context) {
cropIntent.setClass(context, CropImageActivity.class);
return cropIntent;
}
static interface Extra {
String ASPECT_X = "aspect_x";
String ASPECT_Y = "aspect_y";
String MAX_X = "max_x";
String MAX_Y = "max_y";
String ERROR = "error";
}
}

View file

@ -0,0 +1,17 @@
<?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="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dp"
android:text="@string/news_not_found"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>

View file

@ -0,0 +1,13 @@
package com.adins.mss.base.commons;
import androidx.fragment.app.Fragment;
/**
* Created by Aditya Purwa on 1/13/2015.
*/
public interface FragmentHost {
public Fragment getActiveFragment();
public void setActiveFragment(Fragment fragment);
}

View file

@ -0,0 +1,72 @@
package com.adins.mss.odr.catalogue;
import android.content.Context;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.adins.mss.base.GlobalData;
import com.adins.mss.base.util.Utility;
import com.adins.mss.dao.MobileContentH;
import com.adins.mss.foundation.db.dataaccess.MobileContentHDataAccess;
import com.adins.mss.odr.R;
import org.acra.ACRA;
import java.util.List;
/**
* Created by olivia.dg on 11/28/2017.
*/
public class FragmentPromotion extends Fragment {
private List<MobileContentH> promoList;
private RecyclerView list;
private RecyclerView.LayoutManager layoutManager;
private PromoListAdapter adapter;
@Override
public void onAttach(Context context) {
super.onAttach(context);
setHasOptionsMenu(true);
promoList = MobileContentHDataAccess.getAll(context, GlobalData.getSharedGlobalData().getUser().getUuid_user());
ACRA.getErrorReporter().putCustomData("LAST_CLASS_ACCESSED", getClass().getSimpleName());
}
@Override
public void onDestroyView() {
super.onDestroyView();
Utility.freeMemory();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_promo, container, false);
list = (RecyclerView) view.findViewById(R.id.promoList);
layoutManager = new LinearLayoutManager(getActivity());
list.setLayoutManager(layoutManager);
adapter = new PromoListAdapter(getActivity(), promoList);
list.setAdapter(adapter);
return view;
}
@Override
public void onResume() {
super.onResume();
getActivity().findViewById(com.adins.mss.base.R.id.search).setVisibility(View.GONE);
getActivity().findViewById(com.adins.mss.base.R.id.spinner).setVisibility(View.GONE);
getActivity().setTitle("PROMOTIONS");
}
@Override
public void onPause() {
super.onPause();
}
}

View file

@ -0,0 +1,138 @@
package com.adins.mss.coll.models;
import java.io.Serializable;
import java.util.Date;
/**
* Created by dian.ina on 08/05/2015.
*/
public class CollectionActivityItem implements Serializable {
private String uuidTaskId;
private Date dtmCrt;
private String usrCrt;
private String agreementNo;
private String branchCode;
private Date activityDate;
private String collectorName;
private String activity;
private String result;
private Date ptpDate;
private String notes;
private String overDueDays;
public void setUuidTaskId(String uuidTaskId)
{
this.uuidTaskId = uuidTaskId;
}
public void setDtmCrt(Date dtmCrt)
{
this.dtmCrt = dtmCrt;
}
public void setUsrCrt(String usrCrt)
{
this.usrCrt = usrCrt;
}
public void setAgreementNo(String agreementNo)
{
this.agreementNo = agreementNo;
}
public void setBranchCode(String branchCode)
{
this.branchCode = branchCode;
}
public void setActivityDate(Date activityDate)
{
this.activityDate = activityDate;
}
public void setCollectorName(String collectorName)
{
this.collectorName = collectorName;
}
public void setActivity(String activity)
{
this.activity = activity;
}
public void setResult(String result)
{
this.result = result;
}
public void setPtpDate(Date ptpDate)
{
this.ptpDate = ptpDate;
}
public void setNotes(String notes)
{
this.notes = notes;
}
public void setOverDueDays(String overDueDays)
{
this.overDueDays = overDueDays;
}
public Date getDtmCrt()
{
return dtmCrt;
}
public String getUsrCrt()
{
return usrCrt;
}
public String getAgreementNo()
{
return agreementNo;
}
public String getBranchCode()
{
return branchCode;
}
public Date getActivityDate()
{
return activityDate;
}
public String getCollectorName()
{
return collectorName;
}
public String getActivity()
{
return activity;
}
public String getResult()
{
return result;
}
public Date getPtpDate()
{
return ptpDate;
}
public String getNotes()
{
return notes;
}
public String getOverDueDays()
{
return overDueDays;
}
}

View file

@ -0,0 +1,268 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/transparantLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:layout_above="@+id/dialogLinearLayout"
android:orientation="vertical"/>
<LinearLayout
android:id="@+id/dialogLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:background="@drawable/bottomnav_background">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="5dp"
android:layout_weight="0.5">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/spinnerForm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/dropdown_background"
android:padding="5dp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_expand"
android:layout_alignRight="@+id/spinnerForm"
android:layout_alignBottom="@+id/spinnerForm"
android:layout_alignTop="@+id/spinnerForm"
android:layout_marginRight="10dp"
android:tint="@color/gradient_end"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
android:layout_marginBottom="10dp"
android:layout_weight="0.5">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/spinnerTask"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/dropdown_background"
android:padding="5dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_expand"
android:layout_alignRight="@+id/spinnerTask"
android:layout_alignBottom="@+id/spinnerTask"
android:layout_alignTop="@+id/spinnerTask"
android:layout_marginRight="10dp"
android:tint="@color/gradient_end"/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Customer Name:"
android:textColor="@color/gradient_end"/>
<EditText
android:id="@+id/customerNameEdtTxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/form_edittext_background"
android:padding="5dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="-"
android:textColor="@color/gradient_end"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="-"
android:textColor="@color/gradient_end"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="-"
android:textColor="@color/gradient_end"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="OS Principal"
android:textColor="@color/gradient_end"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="@+id/osPrincipalFrom"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/form_edittext_background"
android:padding="5dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:inputType="number"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="~"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"/>
<EditText
android:id="@+id/osPrincipalTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/form_edittext_background"
android:padding="5dp"
android:inputType="number"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tenor"
android:textColor="@color/gradient_end"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="@+id/tenorFrom"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/form_edittext_background"
android:padding="5dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:inputType="number"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="~"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"/>
<EditText
android:id="@+id/tenorTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/form_edittext_background"
android:padding="5dp"
android:inputType="number"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
android:layout_marginBottom="10dp"
android:layout_weight="0.5">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="PTP"
android:textColor="@color/gradient_end"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/spinnerPTP"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/dropdown_background"
android:padding="5dp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_expand"
android:layout_alignRight="@+id/spinnerPTP"
android:layout_alignBottom="@+id/spinnerPTP"
android:layout_alignTop="@+id/spinnerPTP"
android:layout_marginRight="10dp"
android:tint="@color/gradient_end"/>
</RelativeLayout>
</LinearLayout>
<Button
android:id="@+id/btnSearch"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/button_background"
android:text="@string/btnSearch"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="30dp"
android:textColor="@color/fontColorWhite"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</LinearLayout>
</RelativeLayout>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="-100%"
android:toXDelta="0%"
android:duration="@android:integer/config_mediumAnimTime" />
</set>

View file

@ -0,0 +1,213 @@
package com.adins.mss.dao;
import com.adins.mss.base.util.ExcludeFromGson;
import com.google.gson.annotations.SerializedName;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
/**
* Entity mapped to table "TR_COLLECTIONACTIVITY".
*/
public class CollectionActivity {
/** Not-null value. */
@SerializedName("uuid_collection_activity")
private String uuid_collection_activity;
@SerializedName("uuid_task_h")
private String uuid_task_h;
@SerializedName("agreement_no")
private String agreement_no;
@SerializedName("branch_code")
private String branch_code;
@SerializedName("collector_name")
private String collector_name;
@SerializedName("activity")
private String activity;
@SerializedName("result")
private String result;
@SerializedName("notes")
private String notes;
@SerializedName("overdue_days")
private String overdue_days;
@SerializedName("activity_date")
private java.util.Date activity_date;
@SerializedName("ptp_date")
private java.util.Date ptp_date;
@SerializedName("usr_crt")
private String usr_crt;
@SerializedName("dtm_crt")
private java.util.Date dtm_crt;
@SerializedName("usr_upd")
private String usr_upd;
@SerializedName("dtm_upd")
private java.util.Date dtm_upd;
@SerializedName("next_plan_date")
private java.util.Date next_plan_date;
@SerializedName("next_plan_action")
private String next_plan_action;
public CollectionActivity() {
}
public CollectionActivity(String uuid_collection_activity) {
this.uuid_collection_activity = uuid_collection_activity;
}
public CollectionActivity(String uuid_collection_activity, String uuid_task_h, String agreement_no, String branch_code, String collector_name, String activity, String result, String notes, String overdue_days, java.util.Date activity_date, java.util.Date ptp_date, String usr_crt, java.util.Date dtm_crt, String usr_upd, java.util.Date dtm_upd, java.util.Date next_plan_date, String next_plan_action) {
this.uuid_collection_activity = uuid_collection_activity;
this.uuid_task_h = uuid_task_h;
this.agreement_no = agreement_no;
this.branch_code = branch_code;
this.collector_name = collector_name;
this.activity = activity;
this.result = result;
this.notes = notes;
this.overdue_days = overdue_days;
this.activity_date = activity_date;
this.ptp_date = ptp_date;
this.usr_crt = usr_crt;
this.dtm_crt = dtm_crt;
this.usr_upd = usr_upd;
this.dtm_upd = dtm_upd;
this.next_plan_date = next_plan_date;
this.next_plan_action = next_plan_action;
}
/** Not-null value. */
public String getUuid_collection_activity() {
return uuid_collection_activity;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setUuid_collection_activity(String uuid_collection_activity) {
this.uuid_collection_activity = uuid_collection_activity;
}
public String getUuid_task_h() {
return uuid_task_h;
}
public void setUuid_task_h(String uuid_task_h) {
this.uuid_task_h = uuid_task_h;
}
public String getAgreement_no() {
return agreement_no;
}
public void setAgreement_no(String agreement_no) {
this.agreement_no = agreement_no;
}
public String getBranch_code() {
return branch_code;
}
public void setBranch_code(String branch_code) {
this.branch_code = branch_code;
}
public String getCollector_name() {
return collector_name;
}
public void setCollector_name(String collector_name) {
this.collector_name = collector_name;
}
public String getActivity() {
return activity;
}
public void setActivity(String activity) {
this.activity = activity;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public String getOverdue_days() {
return overdue_days;
}
public void setOverdue_days(String overdue_days) {
this.overdue_days = overdue_days;
}
public java.util.Date getActivity_date() {
return activity_date;
}
public void setActivity_date(java.util.Date activity_date) {
this.activity_date = activity_date;
}
public java.util.Date getPtp_date() {
return ptp_date;
}
public void setPtp_date(java.util.Date ptp_date) {
this.ptp_date = ptp_date;
}
public String getUsr_crt() {
return usr_crt;
}
public void setUsr_crt(String usr_crt) {
this.usr_crt = usr_crt;
}
public java.util.Date getDtm_crt() {
return dtm_crt;
}
public void setDtm_crt(java.util.Date dtm_crt) {
this.dtm_crt = dtm_crt;
}
public String getUsr_upd() {
return usr_upd;
}
public void setUsr_upd(String usr_upd) {
this.usr_upd = usr_upd;
}
public java.util.Date getDtm_upd() {
return dtm_upd;
}
public void setDtm_upd(java.util.Date dtm_upd) {
this.dtm_upd = dtm_upd;
}
public java.util.Date getNext_plan_date() {
return next_plan_date;
}
public void setNext_plan_date(java.util.Date next_plan_date) {
this.next_plan_date = next_plan_date;
}
public String getNext_plan_action() {
return next_plan_action;
}
public void setNext_plan_action(String next_plan_action) {
this.next_plan_action = next_plan_action;
}
}