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,225 @@
<?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: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="5dp"
android:layout_margin="3dp"
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_mma"
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_mma"
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_mma"
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">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/cbSearchByMonth"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_marginLeft="5dp"
android:padding="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:background="@drawable/dropdown_background"
android:layout_centerVertical="true"/>
<ImageView
android:id="@+id/img1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_expand_more_24dp"
android:layout_alignRight="@+id/cbSearchByMonth"
android:layout_alignBottom="@+id/cbSearchByMonth"
android:layout_alignTop="@+id/cbSearchByMonth"
android:layout_marginRight="10dp"
android:tint="@color/gradient_end"/>
</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="5dp"
android:layout_margin="3dp"
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,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<corners android:radius="10dip"/>
<stroke android:color="@color/gradient_end" android:width="5dip"/>
<solid android:color="@color/gradient_end"/>
</shape>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="#15000000"
android:startColor="#15000000"
android:type="linear"/>
</shape>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="define_int_MobileCollection">year;owner</string>
<string name="library_MobileCollection_author">AdIns</string>
<string name="library_MobileCollection_authorWebsite">http://ad-ins.com/</string>
<string name="library_MobileCollection_libraryName">CollAct v2.0</string>
<string name="library_MobileCollection_libraryDescription">
Mobile Collection is powerfull mobile application for smartphones that supports finance companies field task force and any field operators to increase their productivity.
</string>
<string name="library_MobileCollection_libraryVersion">1.0.0</string>
<string name="library_MobileCollection_libraryWebsite">https://ad-ins.com/MobileCollection</string>
<string name="library_MobileCollection_licenseId">apache_2_0</string>
<string name="library_MobileCollection_isOpenSource">true</string>
<string name="library_MobileCollection_repositoryLink">https://ad-ins.com/MobileCollection</string>
<!-- Custom variables section -->
<string name="library_MobileCollection_owner">PT. Adicipta Dinamika Inovasi</string>
<string name="library_MobileCollection_year">2015</string>
</resources>

View file

@ -0,0 +1,165 @@
package com.adins.mss.base.checkout.activity;
import android.app.ActionBar;
import android.content.Context;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.adins.mss.base.R;
import com.adins.mss.base.checkout.CheckOutLocationTask;
import com.adins.mss.base.checkout.CheckOutManager;
import com.adins.mss.base.crashlytics.FireCrash;
import com.adins.mss.base.timeline.Constants;
import com.adins.mss.dao.LocationInfo;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
public class CheckOutActivity extends Fragment implements
OnClickListener, OnMapReadyCallback {
public static TextView AddressLocale;
public static TextView AddressLine;
public static LinearLayout descLayout;
static CheckOutManager manager;
static LocationInfo info;
static LatLng latLng;
static GoogleMap mGoogleMap;
private static Context context;
private static String[] address;
private static View view;
Button btnRefresh;
double mLatitude = 0;
double mLongitude = 0;
public static void setLocation(String[] address) {
descLayout.setVisibility(View.VISIBLE);
AddressLocale.setText(address[0]);
AddressLine.setText(address[1]);
CheckOutActivity.address = address;
}
public static void setNewLocation() {
info = manager.getNewLocation();
manager.getAddressLocation(context, info);
latLng = manager.getLatLng(info);
mGoogleMap.clear();
mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 12));
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.position(latLng);
markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));
mGoogleMap.addMarker(markerOptions);
// CheckOutManager.stopPeriodicUpdates();
}
@Override
public void onAttach(Context activity) {
super.onAttach(activity);
setHasOptionsMenu(true);
getActivity().getActionBar().setTitle(getString(R.string.title_mn_absentout));
context = activity;
try {
manager = new CheckOutManager(activity);
info = manager.getLocationInfoCheckOut();
manager.getAddressLocation(context, info);
latLng = manager.getLatLng(info);
} catch (Exception e) {
FireCrash.log(e);
// TODO: handle exception
}
}
@Override
public void onResume() {
super.onResume();
getActivity().getActionBar().removeAllTabs();
getActivity().getActionBar().setTitle(getString(R.string.title_mn_absentout));
getActivity().getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// super.onCreateView(inflater, container, savedInstanceState);
if (view != null) {
ViewGroup parent = (ViewGroup) view.getParent();
if (parent != null)
parent.removeView(view);
}
try {
view = inflater.inflate(R.layout.checkout_layout, container, false);
AddressLocale = (TextView) view.findViewById(R.id.textLocalOut);
AddressLine = (TextView) view.findViewById(R.id.textAddressOut);
descLayout = (LinearLayout) view.findViewById(R.id.DescLayoutOut);
btnRefresh = (Button) view.findViewById(R.id.btnRefreshCOut);
btnRefresh.setOnClickListener(this);
descLayout.setOnClickListener(this);
SupportMapFragment fragment = (SupportMapFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.mapOut);
// Setting Google Map
fragment.getMapAsync(this);
} catch (Exception e) {
FireCrash.log(e);
// TODO: handle exception
// initializeMaps();
}
Constants.inAbsent = true;
return view;
}
private void initializeMaps() {
try {
mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 12));
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.position(latLng);
markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));
mGoogleMap.addMarker(markerOptions);
} catch (Exception e) {
FireCrash.log(e);
// TODO: handle exception
}
}
@Override
public void onDestroy() {
super.onDestroy();
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
int id = v.getId();
if (id == R.id.btnRefreshCOut) {
manager.updateLocationCheckOut();
} else if (id == R.id.DescLayoutOut) {
CheckOutLocationTask task = new CheckOutLocationTask(context, getString(R.string.progressWait),
getString(R.string.msgUnavaibleLocationCheckOut), info, address);
task.execute();
}
}
@Override
public void onMapReady(GoogleMap googleMap) {
mGoogleMap = googleMap;
initializeMaps();
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB