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,17 @@
package com.adins.mss.coll.models.loyaltymodels;
import com.google.gson.annotations.SerializedName;
public class RankDetail {
@SerializedName("LEVEL")
public String level;
@SerializedName("RANK")
public String rank;
public transient int colorValue;
public RankDetail(String level, String rank, int colorValue) {
this.level = level;
this.rank = rank;
this.colorValue = colorValue;
}
}

View file

@ -0,0 +1,9 @@
package com.adins.mss.coll.closingtask.models;
import com.adins.mss.foundation.http.MssResponseType;
/**
* Created by angga.permadi on 3/3/2016.
*/
public class ClosingTaskResponse extends MssResponseType {
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/fontColorWhite" />
<stroke android:color="@color/gradient_end"
android:width="3dp"/>
</shape>

View file

@ -0,0 +1,103 @@
<?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:paddingBottom="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/librarynameS1"
android:text="@string/library_name"
android:fontFamily="sans-serif-condensed"
android:textStyle="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"/>
<TextView
android:id="@+id/libraryversionS1"
android:textColor="@color/text_openSource"
android:textStyle="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:maxLines="1"
android:textSize="@dimen/textSizeSmall_openSource"
android:text="@string/version"/>
<TextView
android:id="@+id/librarycreatorS1"
android:text="@string/library_creator"
android:fontFamily="sans-serif-condensed"
android:textStyle="normal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:gravity="right"
android:maxLines="2"
android:textSize="14sp"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_marginTop="4dp"
android:background="@color/dividerLight_openSource"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="4dp">
<TextView
android:id="@+id/descriptionS1"
android:text="@string/description"
android:fontFamily="sans-serif-condensed"
android:textStyle="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:maxLines="20">
</TextView>
</LinearLayout>
<View
android:id="@+id/libraryBottomDividerS1"
android:layout_width="match_parent"
android:layout_height="2px"
android:layout_marginTop="4dp"
android:background="@color/dividerLight_openSource"/>
<LinearLayout
android:id="@+id/libraryBottomContainerS1"
android:gravity="center_vertical"
android:paddingLeft="8dp"
android:paddingTop="4dp"
android:paddingRight="8dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/librarylicenseS1"
android:textColor="@color/text_openSource"
android:textStyle="normal"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="right"
android:maxLines="1"
android:fontFamily="sans-serif-condensed"
android:textSize="@dimen/textSizeSmall_openSource"
android:text="@string/license"/>
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,50 @@
package com.adins.mss.odr.assignment;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import com.adins.mss.dao.TaskH;
import com.adins.mss.odr.R;
import com.adins.mss.odr.model.JsonResponseServer.ResponseServer;
import com.androidquery.AQuery;
import java.util.List;
public class OrderAssignmentAdapter extends ArrayAdapter<ResponseServer>{
private Context context;
private List<TaskH> objects;
private List<ResponseServer> responseServer;
private boolean isLookup = false;
AQuery query;
public OrderAssignmentAdapter(Context context, List<ResponseServer> objects, boolean isLookup) {
super(context, R.layout.orderassignment_item_layout, objects);
this.context = context;
this.responseServer = objects;
this.isLookup=isLookup;
}
@Override
public int getCount() {
return responseServer.size();
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(R.layout.orderassignment_item_layout, parent, false);
}
query = new AQuery(convertView);
ResponseServer header = responseServer.get(position);
if(isLookup){
if(header.getKey()!=null)
query.id(R.id.txtNoOrder).text(header.getFlag());
}else{
if(header.getKey()!=null)
query.id(R.id.txtNoOrder).text(header.getKey());
}
query.id(R.id.txtCustomerName).text(header.getValue());
return convertView;
}
}

View file

@ -0,0 +1,333 @@
package com.adins.mss.base.fragments
import android.app.Activity
import android.bluetooth.BluetoothAdapter
import android.bluetooth.BluetoothDevice
import android.content.*
import android.net.Uri
import android.os.Bundle
import android.os.Handler
import androidx.fragment.app.Fragment
import android.util.Log
import android.view.*
import android.widget.Toast
import com.adins.mss.base.R
import com.adins.mss.constant.Global
import com.adins.mss.foundation.UserHelp.UserHelp
import com.adins.mss.foundation.dialog.NiftyDialogBuilder
import kotlinx.android.synthetic.main.fragment_printing.*
import zj.com.cn.bluetooth.sdk.DeviceListActivity
import zj.com.cn.bluetooth.sdk.Main_Activity1
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
/**
* A simple [Fragment] subclass.
*
*/
class PrintingServiceFragment : Fragment() {
private var param1: String? = null
private var param2: String? = null
private var listener: OnFragmentInteractionListener? = null
private lateinit var bluetoothAdapter: BluetoothAdapter
private lateinit var printPrefs : SharedPreferences
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
printPrefs = activity!!.getSharedPreferences(PRINT_PREFS, Context.MODE_PRIVATE)
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter()
if (!bluetoothAdapter.isEnabled) {
bluetoothAdapter.enable()
}
}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_printing, container, false)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
if (printPrefs.contains(EXTRA_PRINTER_NAME)) {
val address = printPrefs.getString(EXTRA_PRINTER_ADDRESS, "")
defaultPrintingService.visibility = View.VISIBLE
printDefault.text = printPrefs.getString(EXTRA_PRINTER_NAME, "Not available")
printTest.setOnClickListener {
if (address != null) {
printTest(address)
}
}
} else {
defaultPrintingService.visibility = View.GONE
printTest.visibility = View.GONE
}
choosePrinter.setOnClickListener { selectPrinter() }
defaultPrintingService.setOnClickListener {
val dialog = NiftyDialogBuilder.getInstance(context)
dialog.isCancelable(false)
dialog.isCancelableOnTouchOutside(false)
dialog.withTitle(printDefault.text)
dialog.withMessage(String.format(getString(R.string.message_remove_default_printer), printDefault.text))
// dialog.withMessage(String.format(getString(R.string.message_remove_default_printer), printDefault.text))
dialog.withButton1Text(getString(R.string.btnDelete))
dialog.withButton2Text(getString(R.string.btnCancel))
dialog.setButton1Click {
val address = printPrefs.getString(EXTRA_PRINTER_ADDRESS, "")
val device = bluetoothAdapter.getRemoteDevice(address)
printPrefs.edit().clear().apply()
if (device.bondState == BluetoothDevice.BOND_BONDED) {
Main_Activity1.unpairDevice(device)
}
printDefault.text = getString(R.string.not_available)
defaultPrintingService.visibility = View.GONE
printTest.visibility = View.GONE
dialog.dismiss()
}
dialog.setButton2Click {
dialog.dismiss()
}
dialog.show()
}
view.viewTreeObserver.addOnGlobalLayoutListener(ViewTreeObserver.OnGlobalLayoutListener {
val handler = Handler()
handler.postDelayed({
if(!UserHelp.isActive)
UserHelp.showAllUserHelp(this@PrintingServiceFragment.activity,
this@PrintingServiceFragment.javaClass.simpleName)
}, Global.SHOW_USERHELP_DELAY_DEFAULT.toLong())
})
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
if(item?.itemId == R.id.mnGuide){
if(!Global.BACKPRESS_RESTRICTION) {
val handler = Handler()
handler.postDelayed({
if (!UserHelp.isActive)
UserHelp.showAllUserHelp(this@PrintingServiceFragment.getActivity(),
this@PrintingServiceFragment.javaClass.getSimpleName())
}, Global.SHOW_USERHELP_DELAY_DEFAULT.toLong())
view?.viewTreeObserver?.addOnGlobalLayoutListener(ViewTreeObserver.OnGlobalLayoutListener {
if (!UserHelp.isActive)
UserHelp.showAllUserHelp(this@PrintingServiceFragment.getActivity(),
this@PrintingServiceFragment.javaClass.getSimpleName())
})
}
}
return super.onOptionsItemSelected(item)
}
private fun printTest(address: String) {
if (!bluetoothAdapter.isEnabled) {
bluetoothAdapter.enable()
Toast.makeText(context,getString(R.string.bluetooth_message),Toast.LENGTH_SHORT).show()
}else{
val intent = Intent(context, Main_Activity1::class.java)
intent.putExtra(BluetoothDevice.EXTRA_DEVICE, address)
intent.putExtra("PRINT_TEST", true)
startActivity(intent)
}
}
private fun selectPrinter() {
if (!bluetoothAdapter.isEnabled) {
bluetoothAdapter.enable()
}
val serverIntent = Intent(context, DeviceListActivity::class.java)
startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE)
}
override fun onResume() {
super.onResume()
activity?.title = getString(R.string.title_mn_printing)
activity?.registerReceiver(bluetoothBondDeviceStateChange, IntentFilter(BluetoothDevice.ACTION_BOND_STATE_CHANGED))
}
override fun onDestroy() {
super.onDestroy()
activity?.unregisterReceiver(bluetoothBondDeviceStateChange)
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == REQUEST_CONNECT_DEVICE) {
// When DeviceListActivityy returns with a device to connect
if (resultCode == Activity.RESULT_OK && data != null) {
// Get the BLuetoothDevice object
if (data.hasExtra(DeviceListActivity.EXTRA_DEVICE_ADDRESS)) {
// Get the device MAC address
val address = data.extras!!.getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS)
val device = bluetoothAdapter.getRemoteDevice(address)
if (printPrefs.contains(EXTRA_PRINTER_NAME)) {
val oldPrinterName = printPrefs.getString(EXTRA_PRINTER_NAME, "")
if (oldPrinterName != device.name) {
updateUI(device)
updatePrinterPrefs(device)
}
//Update printer Address
printPrefs.edit()
.putString(EXTRA_PRINTER_ADDRESS, device.address)
.apply()
} else {
updateUI(device)
updatePrinterPrefs(device)
}
} else if (data.hasExtra(DeviceListActivity.EXTRA_ACTION_DELETE)) { //Nendi - 2019-01-08 | Add request unPairing bluetooth device
if (data.extras!!.getInt(DeviceListActivity.EXTRA_ACTION_DELETE) == 1) {
val device = data.getParcelableExtra<BluetoothDevice>(BluetoothDevice.EXTRA_DEVICE)
Main_Activity1.unpairDevice(device)
}
} else { //Nendi - 2019-01-08 | Add request pairing bluetooth device
val device = data.getParcelableExtra<BluetoothDevice>(BluetoothDevice.EXTRA_DEVICE)
Main_Activity1.pairDevice(device)
}
}
}
}
private fun updatePrinterPrefs(device: BluetoothDevice) {
// Add printer type to preferences
val printType: Int = if (device.name.toLowerCase().contains("woosim")) 0 else 1
printPrefs.edit()
.putInt(EXTRA_PRINTER_TYPE, printType)
.putString(EXTRA_PRINTER_NAME, device.name)
.putString(EXTRA_PRINTER_ADDRESS, device.address)
.apply()
}
private fun updateUI(device: BluetoothDevice) {
if (printTest.visibility == View.GONE) {
printTest.visibility = View.VISIBLE
defaultPrintingService.visibility = View.VISIBLE
}
printDefault.text = device.name
printTest.setOnClickListener { printTest(device.address) }
}
//Method for request pairing bluetooth device
private fun pairDevice(device: BluetoothDevice) {
try {
Log.d("pairDevice()", "Start Pairing...")
val m = device.javaClass.getMethod("createBond", null)
m.invoke(device, null as Array<Any>?)
Log.d("pairDevice()", "Pairing finished.")
} catch (e: Exception) {
Log.e("pairDevice()", e.message!!)
}
}
private fun unpairDevice(device: BluetoothDevice) {
try {
Log.d("unpairDevice()", "Start Un-Pairing...")
val m = device.javaClass.getMethod("removeBond", null)
m.invoke(device, null as Array<Any>?)
Log.d("unpairDevice()", "Un-Pairing finished.")
} catch (e: Exception) {
Log.e("unpairDevice()", e.message!!)
}
}
//Nendi: 2019-01-08 | Bond device state change listener
private val bluetoothBondDeviceStateChange = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
if (BluetoothDevice.ACTION_BOND_STATE_CHANGED == intent.action) {
val mDevice = intent.getParcelableExtra<BluetoothDevice>(BluetoothDevice.EXTRA_DEVICE)
if (mDevice?.bondState == BluetoothDevice.BOND_BONDED) {
updateUI(mDevice)
updatePrinterPrefs(mDevice)
}
}
}
}
// TODO: Rename method, update argument and hook method into UI event
fun onButtonPressed(uri: Uri) {
listener?.onFragmentInteraction(uri)
}
override fun onAttach(context: Context) {
super.onAttach(context)
if (context is OnFragmentInteractionListener) {
listener = context
} else {
// throw RuntimeException(context.toString() + " must implement OnFragmentInteractionListener")
}
setHasOptionsMenu(true)
}
override fun onDetach() {
super.onDetach()
listener = null
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
*
*
* See the Android Training lesson [Communicating with Other Fragments]
* (http://developer.android.com/training/basics/fragments/communicating.html)
* for more information.
*/
interface OnFragmentInteractionListener {
// TODO: Update argument type and name
fun onFragmentInteraction(uri: Uri)
}
companion object {
val PRINT_PREFS = "printPrefs"
val EXTRA_PRINTER_TYPE = "printerType"
val EXTRA_PRINTER_NAME = "printerName"
val EXTRA_PRINTER_ADDRESS = "printerAddress"
val REQUEST_CONNECT_DEVICE = 1
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment PrintingServiceFragment.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
PrintingServiceFragment().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
}
}
}

View file

@ -0,0 +1,18 @@
package org.acra.util;
import android.content.Context;
import org.apache.http.conn.scheme.SocketFactory;
/**
* Default implementation of a HttpSocketFactoryFactory.
*/
public final class DefaultHttpsSocketFactoryFactory implements HttpsSocketFactoryFactory {
public static final HttpsSocketFactoryFactory INSTANCE = new DefaultHttpsSocketFactoryFactory();
@Override
public SocketFactory create(Context context) {
return new TlsSniSocketFactory();
}
}

View file

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/bgColor"
xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="60dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="5dp"
app:cardElevation="5dp"
android:layout_margin="3dp"
android:id="@+id/accLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingRight="5dp"
android:paddingLeft="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/chooseAcc"
android:drawableLeft="@drawable/ic_person_color"
android:drawablePadding="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/spinnerAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:spinnerMode="dropdown"
android:layout_marginRight="5dp"
android:layout_marginLeft="5dp"
android:background="@drawable/dropdown_background"
android:padding="5dp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_expand_more_24dp"
android:layout_alignRight="@+id/spinnerAccount"
android:layout_alignBottom="@+id/spinnerAccount"
android:layout_alignTop="@+id/spinnerAccount"
android:layout_marginRight="10dp"
android:tint="@color/gradient_end"/>
</RelativeLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="5dp"
app:cardElevation="5dp"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:layout_marginBottom="3dp"
android:id="@+id/notesLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingRight="5dp"
android:paddingLeft="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/lbltopic"
android:drawableLeft="@drawable/ic_form_color"
android:drawablePadding="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<EditText
android:id="@+id/txtNotes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text=""
android:textColor="@drawable/edit_text_selector"
android:minLines="3"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</ScrollView>
<Button
android:id="@+id/btnStart"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/button_background"
android:text="@string/btnStart"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/txt_button"
android:layout_marginBottom="6dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
<Button
android:id="@+id/btnViewTask"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:background="@drawable/button_background"
android:text="@string/btnView"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/fontColorWhite"
android:layout_margin="5dp"
android:visibility="gone"/>
</RelativeLayout>

View file

@ -0,0 +1,229 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bgColor" >
<ScrollView
android:id="@+id/surveyPerformanceMain"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:contentPadding="7dp"
app:cardElevation="@dimen/card_shadow"
android:layout_margin="@dimen/card_margin"
app:cardBackgroundColor="@color/fontColorWhite">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_margin="5dp"
android:layout_gravity="center_vertical|left"
android:background="@drawable/dropdown_background">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/cbSearchBy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/fontColorWhite"
android:background="@drawable/transparent_bg"
android:layout_centerVertical="true"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_search_white"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="15dp"
android:tint="@color/gradient_end"
android:layout_centerVertical="true"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/byEstimatedDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:text="@string/lblStartDate"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_gravity="center_vertical" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="0.3">
<EditText
android:id="@+id/txtStartDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/btnStartDate"
android:layout_marginRight="10dp"
android:padding="5dp"
android:background="@drawable/dropdown_background"
android:editable="false"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_centerVertical="true"/>
<ImageButton
android:id="@+id/btnStartDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/transparent_bg"
android:src="@drawable/icon_calendar"
android:elevation="5dp"/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:text="@string/lblEndDate"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_gravity="center_vertical" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="0.3">
<EditText
android:id="@+id/txtEndDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/btnEndDate"
android:layout_marginRight="10dp"
android:padding="5dp"
android:background="@drawable/dropdown_background"
android:editable="false"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_centerVertical="true"/>
<ImageButton
android:id="@+id/btnEndDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:layout_centerVertical="true"
android:background="@drawable/transparent_bg"
android:src="@drawable/icon_calendar"
android:elevation="5dp"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/byDay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" >
<EditText
android:id="@+id/txtDateDay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/btnDate"
android:layout_marginRight="10dp"
android:layout_marginLeft="5dp"
android:padding="5dp"
android:background="@drawable/dropdown_background"
android:editable="false"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_centerVertical="true"/>
<ImageButton
android:id="@+id/btnDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/transparent_bg"
android:src="@drawable/icon_calendar"
android:elevation="5dp"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/byMonth"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp"
android:visibility="gone">
<EditText
android:id="@+id/txtDateAndYear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/btnMonthYear"
android:layout_marginRight="10dp"
android:layout_marginLeft="5dp"
android:padding="5dp"
android:background="@drawable/dropdown_background"
android:editable="false"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_centerVertical="true"/>
<ImageButton
android:id="@+id/btnMonthYear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/transparent_bg"
android:src="@drawable/icon_calendar"
android:elevation="5dp"/>
</RelativeLayout>
<Button
android:id="@+id/btnSearchOrder"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_margin="5dp"
android:background="@drawable/button_background"
android:text="@string/btnOk"
android:textColor="@color/fontColorWhite"
android:gravity="center_vertical|center_horizontal"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</ScrollView>
<androidx.cardview.widget.CardView
android:id="@+id/resultLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:contentPadding="7dp"
app:cardElevation="@dimen/card_shadow"
android:layout_margin="@dimen/card_margin"
app:cardBackgroundColor="@color/fontColorWhite"
android:visibility="gone">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/resultListView"
android:visibility="visible"
android:padding="5dp">
</ListView>
</androidx.cardview.widget.CardView>
</LinearLayout>

View file

@ -0,0 +1,13 @@
package com.adins.mss.base.commons;
/**
* Created by kusnendi.muhamad on 28/07/2017.
*/
public interface TaskListener {
public void onCompleteTask(Object result);
public void onCancelTask(boolean value);
public void onLocalData(Object result);
}