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,507 @@
<?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="wrap_content"
android:id="@+id/timelineContainer">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center"
android:id="@+id/timelineItem">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<View
android:layout_width="1dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@color/timelineLine" />
<ImageView
android:id="@+id/timelineIcon"
android:layout_width="35dp"
android:layout_height="wrap_content"
android:src="@drawable/task_highpriority"
android:padding="2dp"
android:layout_marginTop="10dp"/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/taskHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:contentPadding="5dp"
app:cardBackgroundColor="@color/fontColorWhite"
app:cardElevation="@dimen/card_shadow"
android:layout_margin="@dimen/card_margin">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/taskName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:layout_weight="0.8"
android:text="Sample Name"
android:textAppearance="?android:attr/textAppearanceSmall"
android:drawableLeft="@drawable/ic_person_color"
android:drawablePadding="5dp"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2">
<TextView
android:id="@+id/taskTime"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="right"
android:text="Time"
android:textSize="10dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<TextView
android:id="@+id/taskAddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/container"
android:paddingBottom="5dp"
android:text="Sample Address"
android:textAppearance="?android:attr/textAppearanceSmall"
android:drawableLeft="@drawable/ic_location_color"
android:drawablePadding="5dp"/>
<TextView
android:id="@+id/taskCollResult"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/taskAddress"
android:paddingBottom="5dp"
android:text="@string/collection_result"
android:textAppearance="?android:attr/textAppearanceSmall"
android:drawableLeft="@drawable/ic_coll_result"
android:drawablePadding="5dp"
android:visibility="gone"/>
<LinearLayout
android:id="@+id/collectionInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_below="@id/taskCollResult">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="0.5">
<TextView
android:id="@+id/taskAgreement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:text="@string/lblAgreementNo"
android:textSize="12dp"
android:drawableLeft="@drawable/ic_form_color"
android:drawablePadding="5dp"/>
<TextView
android:id="@+id/taskOverdue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Overdue"
android:textSize="12dp"
android:drawableLeft="@drawable/ic_date_color"
android:drawablePadding="5dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="0.5">
<TextView
android:id="@+id/taskAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:text="Amount Due"
android:textSize="12dp"
android:drawableLeft="@drawable/ic_cash_color"
android:drawablePadding="5dp"/>
<TextView
android:id="@+id/taskInst"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Installment No"
android:textSize="12dp"
android:drawableLeft="@drawable/ic_no_color"
android:drawablePadding="5dp"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/taskAttendance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:contentPadding="5dp"
app:cardBackgroundColor="@color/fontColorWhite"
app:cardElevation="@dimen/card_shadow"
android:layout_margin="@dimen/card_margin"
android:visibility="gone">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/txtTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/txtDesc"
android:layout_toLeftOf="@+id/txtTime"
android:text="Title"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/txtTitle"
android:text="Description"
android:textAppearance="?android:attr/textAppearanceSmall"
android:padding="5dp"/>
<TextView
android:id="@+id/attendanceTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/txtTitle"
android:layout_alignBottom="@+id/txtTitle"
android:layout_alignParentRight="true"
android:text="Time"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="10dp" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
/>
<!-- <LinearLayout-->
<!-- android:id="@+id/taskStatus"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="vertical"-->
<!-- android:visibility="gone">-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:layout_gravity="center"-->
<!-- android:id="@+id/taskStatusItem1"-->
<!-- android:visibility="gone">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="match_parent">-->
<!-- <View-->
<!-- android:layout_width="1dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:background="@color/timelineLine" />-->
<!-- <ImageView-->
<!-- android:id="@+id/taskStatusIcon1"-->
<!-- android:layout_width="30dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:src="@drawable/task_submitted"-->
<!-- android:padding="3dp"/>-->
<!-- </RelativeLayout>-->
<!-- <androidx.cardview.widget.CardView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:cardCornerRadius="10dp"-->
<!-- app:contentPadding="10dp"-->
<!-- app:cardElevation="@dimen/card_shadow"-->
<!-- android:layout_margin="@dimen/card_margin"-->
<!-- app:cardBackgroundColor="@color/fontColorWhite">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content">-->
<!-- <TextView-->
<!-- android:id="@+id/txtStatus1"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_toLeftOf="@+id/txtTime1"-->
<!-- android:text="Title"-->
<!-- android:textAppearance="?android:attr/textAppearanceSmall"/>-->
<!-- <TextView-->
<!-- android:id="@+id/txtDesc1"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/txtStatus1"-->
<!-- android:text="Description"-->
<!-- android:textSize="11dp"-->
<!-- android:visibility="gone"/>-->
<!-- <TextView-->
<!-- android:id="@+id/txtTime1"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:text="Time"-->
<!-- android:textAppearance="?android:attr/textAppearanceSmall"-->
<!-- android:textSize="10dp" />-->
<!-- </RelativeLayout>-->
<!-- </androidx.cardview.widget.CardView>-->
<!-- </LinearLayout>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:layout_gravity="center"-->
<!-- android:id="@+id/taskStatusItem2"-->
<!-- android:visibility="gone">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="match_parent">-->
<!-- <View-->
<!-- android:layout_width="1dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:background="@color/timelineLine" />-->
<!-- <ImageView-->
<!-- android:id="@+id/taskStatusIcon2"-->
<!-- android:layout_width="30dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:src="@drawable/task_submitted"-->
<!-- android:padding="3dp"/>-->
<!-- </RelativeLayout>-->
<!-- <androidx.cardview.widget.CardView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:cardCornerRadius="10dp"-->
<!-- app:contentPadding="10dp"-->
<!-- app:cardElevation="@dimen/card_shadow"-->
<!-- android:layout_margin="@dimen/card_margin"-->
<!-- app:cardBackgroundColor="@color/fontColorWhite" >-->
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content">-->
<!-- <TextView-->
<!-- android:id="@+id/txtStatus2"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_toLeftOf="@+id/txtTime"-->
<!-- android:text="Title"-->
<!-- android:textAppearance="?android:attr/textAppearanceSmall"/>-->
<!-- <TextView-->
<!-- android:id="@+id/txtDesc2"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/txtStatus2"-->
<!-- android:text="Description"-->
<!-- android:textSize="11dp"-->
<!-- android:visibility="gone"/>-->
<!-- <TextView-->
<!-- android:id="@+id/txtTime2"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:text="Time"-->
<!-- android:textAppearance="?android:attr/textAppearanceSmall"-->
<!-- android:textSize="10dp" />-->
<!-- </RelativeLayout>-->
<!-- </androidx.cardview.widget.CardView>-->
<!-- </LinearLayout>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:layout_gravity="center"-->
<!-- android:id="@+id/taskStatusItem3"-->
<!-- android:visibility="gone">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="match_parent">-->
<!-- <View-->
<!-- android:layout_width="1dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:background="@color/timelineLine" />-->
<!-- <ImageView-->
<!-- android:id="@+id/taskStatusIcon3"-->
<!-- android:layout_width="30dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:src="@drawable/task_submitted"-->
<!-- android:padding="3dp"/>-->
<!-- </RelativeLayout>-->
<!-- <androidx.cardview.widget.CardView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:cardCornerRadius="10dp"-->
<!-- app:contentPadding="10dp"-->
<!-- app:cardElevation="@dimen/card_shadow"-->
<!-- android:layout_margin="@dimen/card_margin"-->
<!-- app:cardBackgroundColor="@color/fontColorWhite">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content">-->
<!-- <TextView-->
<!-- android:id="@+id/txtStatus3"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_toLeftOf="@+id/txtTime3"-->
<!-- android:text="Title"-->
<!-- android:textAppearance="?android:attr/textAppearanceSmall"/>-->
<!-- <TextView-->
<!-- android:id="@+id/txtDesc3"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/txtStatus3"-->
<!-- android:text="Description"-->
<!-- android:textSize="11dp"-->
<!-- android:visibility="gone"/>-->
<!-- <TextView-->
<!-- android:id="@+id/txtTime3"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:text="Time"-->
<!-- android:textAppearance="?android:attr/textAppearanceSmall"-->
<!-- android:textSize="10dp" />-->
<!-- </RelativeLayout>-->
<!-- </androidx.cardview.widget.CardView>-->
<!-- </LinearLayout>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:layout_gravity="center"-->
<!-- android:id="@+id/taskStatusItem4"-->
<!-- android:visibility="gone">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="match_parent">-->
<!-- <View-->
<!-- android:layout_width="1dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:background="@color/timelineLine" />-->
<!-- <ImageView-->
<!-- android:id="@+id/taskStatusIcon4"-->
<!-- android:layout_width="30dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:src="@drawable/task_submitted"-->
<!-- android:padding="3dp"/>-->
<!-- </RelativeLayout>-->
<!-- <androidx.cardview.widget.CardView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:cardCornerRadius="10dp"-->
<!-- app:contentPadding="10dp"-->
<!-- app:cardElevation="@dimen/card_shadow"-->
<!-- android:layout_margin="@dimen/card_margin"-->
<!-- app:cardBackgroundColor="@color/fontColorWhite">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content">-->
<!-- <TextView-->
<!-- android:id="@+id/txtStatus4"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_toLeftOf="@+id/txtTime4"-->
<!-- android:text="Title"-->
<!-- android:textAppearance="?android:attr/textAppearanceSmall"/>-->
<!-- <TextView-->
<!-- android:id="@+id/txtDesc4"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_below="@id/txtStatus4"-->
<!-- android:text="Description"-->
<!-- android:textSize="11dp"-->
<!-- android:visibility="gone"/>-->
<!-- <TextView-->
<!-- android:id="@+id/txtTime4"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:text="Time"-->
<!-- android:textAppearance="?android:attr/textAppearanceSmall"-->
<!-- android:textSize="10dp" />-->
<!-- </RelativeLayout>-->
<!-- </androidx.cardview.widget.CardView>-->
<!-- </LinearLayout>-->
<!-- </LinearLayout>-->
</LinearLayout>
</LinearLayout>
<androidx.cardview.widget.CardView
android:id="@+id/noData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:contentPadding="10dp"
app:cardElevation="@dimen/card_shadow"
android:layout_margin="@dimen/card_margin"
app:cardBackgroundColor="@color/fontColorWhite"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/data_not_found"
android:textAppearance="?android:attr/textAppearanceSmall" />
</androidx.cardview.widget.CardView>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/timelineLine" />
</LinearLayout>

View file

@ -0,0 +1,514 @@
/*
* Copyright (C) 2010 The Android Open Source Project
*
* 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.libs.nineoldandroids.animation;
import android.view.View;
import com.adins.libs.nineoldandroids.util.Property;
import com.adins.libs.nineoldandroids.view.animation.AnimatorProxy;
import com.adins.mss.foundation.camerainapp.helper.Logger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/**
* This subclass of {@link ValueAnimator} provides support for animating properties on target objects.
* The constructors of this class take parameters to define the target object that will be animated
* as well as the name of the property that will be animated. Appropriate set/get functions
* are then determined internally and the animation will call these functions as necessary to
* animate the property.
*
* @see #setPropertyName(String)
*/
public final class ObjectAnimator extends ValueAnimator {
private static final boolean DBG = false;
private static final Map<String, Property> PROXY_PROPERTIES = new HashMap<String, Property>();
static {
PROXY_PROPERTIES.put("alpha", PreHoneycombCompat.ALPHA);
PROXY_PROPERTIES.put("pivotX", PreHoneycombCompat.PIVOT_X);
PROXY_PROPERTIES.put("pivotY", PreHoneycombCompat.PIVOT_Y);
PROXY_PROPERTIES.put("translationX", PreHoneycombCompat.TRANSLATION_X);
PROXY_PROPERTIES.put("translationY", PreHoneycombCompat.TRANSLATION_Y);
PROXY_PROPERTIES.put("rotation", PreHoneycombCompat.ROTATION);
PROXY_PROPERTIES.put("rotationX", PreHoneycombCompat.ROTATION_X);
PROXY_PROPERTIES.put("rotationY", PreHoneycombCompat.ROTATION_Y);
PROXY_PROPERTIES.put("scaleX", PreHoneycombCompat.SCALE_X);
PROXY_PROPERTIES.put("scaleY", PreHoneycombCompat.SCALE_Y);
PROXY_PROPERTIES.put("scrollX", PreHoneycombCompat.SCROLL_X);
PROXY_PROPERTIES.put("scrollY", PreHoneycombCompat.SCROLL_Y);
PROXY_PROPERTIES.put("x", PreHoneycombCompat.X);
PROXY_PROPERTIES.put("y", PreHoneycombCompat.Y);
}
// The target object on which the property exists, set in the constructor
private Object mTarget;
private String mPropertyName;
private Property mProperty;
/**
* Creates a new ObjectAnimator object. This default constructor is primarily for
* use internally; the other constructors which take parameters are more generally
* useful.
*/
public ObjectAnimator() {
}
/**
* Private utility constructor that initializes the target object and name of the
* property being animated.
*
* @param target The object whose property is to be animated. This object should
* have a public method on it called <code>setName()</code>, where <code>name</code> is
* the value of the <code>propertyName</code> parameter.
* @param propertyName The name of the property being animated.
*/
private ObjectAnimator(Object target, String propertyName) {
mTarget = target;
setPropertyName(propertyName);
}
/**
* Private utility constructor that initializes the target object and property being animated.
*
* @param target The object whose property is to be animated.
* @param property The property being animated.
*/
private <T> ObjectAnimator(T target, Property<T, ?> property) {
mTarget = target;
setProperty(property);
}
/**
* Constructs and returns an ObjectAnimator that animates between int values. A single
* value implies that that value is the one being animated to. Two values imply a starting
* and ending values. More than two values imply a starting value, values to animate through
* along the way, and an ending value (these values will be distributed evenly across
* the duration of the animation).
*
* @param target The object whose property is to be animated. This object should
* have a public method on it called <code>setName()</code>, where <code>name</code> is
* the value of the <code>propertyName</code> parameter.
* @param propertyName The name of the property being animated.
* @param values A set of values that the animation will animate between over time.
* @return An ObjectAnimator object that is set up to animate between the given values.
*/
public static ObjectAnimator ofInt(Object target, String propertyName, int... values) {
ObjectAnimator anim = new ObjectAnimator(target, propertyName);
anim.setIntValues(values);
return anim;
}
/**
* Constructs and returns an ObjectAnimator that animates between int values. A single
* value implies that that value is the one being animated to. Two values imply a starting
* and ending values. More than two values imply a starting value, values to animate through
* along the way, and an ending value (these values will be distributed evenly across
* the duration of the animation).
*
* @param target The object whose property is to be animated.
* @param property The property being animated.
* @param values A set of values that the animation will animate between over time.
* @return An ObjectAnimator object that is set up to animate between the given values.
*/
public static <T> ObjectAnimator ofInt(T target, Property<T, Integer> property, int... values) {
ObjectAnimator anim = new ObjectAnimator(target, property);
anim.setIntValues(values);
return anim;
}
/**
* Constructs and returns an ObjectAnimator that animates between float values. A single
* value implies that that value is the one being animated to. Two values imply a starting
* and ending values. More than two values imply a starting value, values to animate through
* along the way, and an ending value (these values will be distributed evenly across
* the duration of the animation).
*
* @param target The object whose property is to be animated. This object should
* have a public method on it called <code>setName()</code>, where <code>name</code> is
* the value of the <code>propertyName</code> parameter.
* @param propertyName The name of the property being animated.
* @param values A set of values that the animation will animate between over time.
* @return An ObjectAnimator object that is set up to animate between the given values.
*/
public static ObjectAnimator ofFloat(Object target, String propertyName, float... values) {
ObjectAnimator anim = new ObjectAnimator(target, propertyName);
anim.setFloatValues(values);
return anim;
}
/**
* Constructs and returns an ObjectAnimator that animates between float values. A single
* value implies that that value is the one being animated to. Two values imply a starting
* and ending values. More than two values imply a starting value, values to animate through
* along the way, and an ending value (these values will be distributed evenly across
* the duration of the animation).
*
* @param target The object whose property is to be animated.
* @param property The property being animated.
* @param values A set of values that the animation will animate between over time.
* @return An ObjectAnimator object that is set up to animate between the given values.
*/
public static <T> ObjectAnimator ofFloat(T target, Property<T, Float> property,
float... values) {
ObjectAnimator anim = new ObjectAnimator(target, property);
anim.setFloatValues(values);
return anim;
}
/**
* Constructs and returns an ObjectAnimator that animates between Object values. A single
* value implies that that value is the one being animated to. Two values imply a starting
* and ending values. More than two values imply a starting value, values to animate through
* along the way, and an ending value (these values will be distributed evenly across
* the duration of the animation).
*
* @param target The object whose property is to be animated. This object should
* have a public method on it called <code>setName()</code>, where <code>name</code> is
* the value of the <code>propertyName</code> parameter.
* @param propertyName The name of the property being animated.
* @param evaluator A TypeEvaluator that will be called on each animation frame to
* provide the necessary interpolation between the Object values to derive the animated
* value.
* @param values A set of values that the animation will animate between over time.
* @return An ObjectAnimator object that is set up to animate between the given values.
*/
public static ObjectAnimator ofObject(Object target, String propertyName,
TypeEvaluator evaluator, Object... values) {
ObjectAnimator anim = new ObjectAnimator(target, propertyName);
anim.setObjectValues(values);
anim.setEvaluator(evaluator);
return anim;
}
/**
* Constructs and returns an ObjectAnimator that animates between Object values. A single
* value implies that that value is the one being animated to. Two values imply a starting
* and ending values. More than two values imply a starting value, values to animate through
* along the way, and an ending value (these values will be distributed evenly across
* the duration of the animation).
*
* @param target The object whose property is to be animated.
* @param property The property being animated.
* @param evaluator A TypeEvaluator that will be called on each animation frame to
* provide the necessary interpolation between the Object values to derive the animated
* value.
* @param values A set of values that the animation will animate between over time.
* @return An ObjectAnimator object that is set up to animate between the given values.
*/
public static <T, V> ObjectAnimator ofObject(T target, Property<T, V> property,
TypeEvaluator<V> evaluator, V... values) {
ObjectAnimator anim = new ObjectAnimator(target, property);
anim.setObjectValues(values);
anim.setEvaluator(evaluator);
return anim;
}
/**
* Constructs and returns an ObjectAnimator that animates between the sets of values specified
* in <code>PropertyValueHolder</code> objects. This variant should be used when animating
* several properties at once with the same ObjectAnimator, since PropertyValuesHolder allows
* you to associate a set of animation values with a property name.
*
* @param target The object whose property is to be animated. Depending on how the
* PropertyValuesObjects were constructed, the target object should either have the {@link
* android.util.Property} objects used to construct the PropertyValuesHolder objects or (if the
* PropertyValuesHOlder objects were created with property names) the target object should have
* public methods on it called <code>setName()</code>, where <code>name</code> is the name of
* the property passed in as the <code>propertyName</code> parameter for each of the
* PropertyValuesHolder objects.
* @param values A set of PropertyValuesHolder objects whose values will be animated between
* over time.
* @return An ObjectAnimator object that is set up to animate between the given values.
*/
public static ObjectAnimator ofPropertyValuesHolder(Object target,
PropertyValuesHolder... values) {
ObjectAnimator anim = new ObjectAnimator();
anim.mTarget = target;
anim.setValues(values);
return anim;
}
/**
* Sets the property that will be animated. Property objects will take precedence over
* properties specified by the {@link #setPropertyName(String)} method. Animations should
* be set up to use one or the other, not both.
*
* @param property The property being animated. Should not be null.
*/
public void setProperty(Property property) {
// mValues could be null if this is being constructed piecemeal. Just record the
// propertyName to be used later when setValues() is called if so.
if (mValues != null) {
PropertyValuesHolder valuesHolder = mValues[0];
String oldName = valuesHolder.getPropertyName();
valuesHolder.setProperty(property);
mValuesMap.remove(oldName);
mValuesMap.put(mPropertyName, valuesHolder);
}
if (mProperty != null) {
mPropertyName = property.getName();
}
mProperty = property;
// New property/values/target should cause re-initialization prior to starting
mInitialized = false;
}
/**
* Gets the name of the property that will be animated. This name will be used to derive
* a setter function that will be called to set animated values.
* For example, a property name of <code>foo</code> will result
* in a call to the function <code>setFoo()</code> on the target object. If either
* <code>valueFrom</code> or <code>valueTo</code> is null, then a getter function will
* also be derived and called.
*/
public String getPropertyName() {
return mPropertyName;
}
/**
* Sets the name of the property that will be animated. This name is used to derive
* a setter function that will be called to set animated values.
* For example, a property name of <code>foo</code> will result
* in a call to the function <code>setFoo()</code> on the target object. If either
* <code>valueFrom</code> or <code>valueTo</code> is null, then a getter function will
* also be derived and called.
* <p>
* <p>For best performance of the mechanism that calls the setter function determined by the
* name of the property being animated, use <code>float</code> or <code>int</code> typed values,
* and make the setter function for those properties have a <code>void</code> return value. This
* will cause the code to take an optimized path for these constrained circumstances. Other
* property types and return types will work, but will have more overhead in processing
* the requests due to normal reflection mechanisms.</p>
* <p>
* <p>Note that the setter function derived from this property name
* must take the same parameter type as the
* <code>valueFrom</code> and <code>valueTo</code> properties, otherwise the call to
* the setter function will fail.</p>
* <p>
* <p>If this ObjectAnimator has been set up to animate several properties together,
* using more than one PropertyValuesHolder objects, then setting the propertyName simply
* sets the propertyName in the first of those PropertyValuesHolder objects.</p>
*
* @param propertyName The name of the property being animated. Should not be null.
*/
public void setPropertyName(String propertyName) {
// mValues could be null if this is being constructed piecemeal. Just record the
// propertyName to be used later when setValues() is called if so.
if (mValues != null) {
PropertyValuesHolder valuesHolder = mValues[0];
String oldName = valuesHolder.getPropertyName();
valuesHolder.setPropertyName(propertyName);
mValuesMap.remove(oldName);
mValuesMap.put(propertyName, valuesHolder);
}
mPropertyName = propertyName;
// New property/values/target should cause re-initialization prior to starting
mInitialized = false;
}
@Override
public void setIntValues(int... values) {
if (mValues == null || mValues.length == 0) {
// No values yet - this animator is being constructed piecemeal. Init the values with
// whatever the current propertyName is
if (mProperty != null) {
setValues(PropertyValuesHolder.ofInt(mProperty, values));
} else {
setValues(PropertyValuesHolder.ofInt(mPropertyName, values));
}
} else {
super.setIntValues(values);
}
}
@Override
public void setFloatValues(float... values) {
if (mValues == null || mValues.length == 0) {
// No values yet - this animator is being constructed piecemeal. Init the values with
// whatever the current propertyName is
if (mProperty != null) {
setValues(PropertyValuesHolder.ofFloat(mProperty, values));
} else {
setValues(PropertyValuesHolder.ofFloat(mPropertyName, values));
}
} else {
super.setFloatValues(values);
}
}
@Override
public void setObjectValues(Object... values) {
if (mValues == null || mValues.length == 0) {
// No values yet - this animator is being constructed piecemeal. Init the values with
// whatever the current propertyName is
if (mProperty != null) {
setValues(PropertyValuesHolder.ofObject(mProperty, (TypeEvaluator) null, values));
} else {
setValues(PropertyValuesHolder.ofObject(mPropertyName, (TypeEvaluator) null, values));
}
} else {
super.setObjectValues(values);
}
}
@Override
public void start() {
if (DBG) {
Logger.d("ObjectAnimator", "Anim target, duration: " + mTarget + ", " + getDuration());
for (int i = 0; i < mValues.length; ++i) {
PropertyValuesHolder pvh = mValues[i];
ArrayList<Keyframe> keyframes = pvh.mKeyframeSet.mKeyframes;
Logger.d("ObjectAnimator", " Values[" + i + "]: " +
pvh.getPropertyName() + ", " + keyframes.get(0).getValue() + ", " +
keyframes.get(pvh.mKeyframeSet.mNumKeyframes - 1).getValue());
}
}
super.start();
}
/**
* This function is called immediately before processing the first animation
* frame of an animation. If there is a nonzero <code>startDelay</code>, the
* function is called after that delay ends.
* It takes care of the final initialization steps for the
* animation. This includes setting mEvaluator, if the user has not yet
* set it up, and the setter/getter methods, if the user did not supply
* them.
* <p>
* <p>Overriders of this method should call the superclass method to cause
* internal mechanisms to be set up correctly.</p>
*/
@Override
void initAnimation() {
if (!mInitialized) {
// mValueType may change due to setter/getter setup; do this before calling super.init(),
// which uses mValueType to set up the default type evaluator.
if ((mProperty == null) && AnimatorProxy.NEEDS_PROXY && (mTarget instanceof View) && PROXY_PROPERTIES.containsKey(mPropertyName)) {
setProperty(PROXY_PROPERTIES.get(mPropertyName));
}
int numValues = mValues.length;
for (int i = 0; i < numValues; ++i) {
mValues[i].setupSetterAndGetter(mTarget);
}
super.initAnimation();
}
}
/**
* Sets the length of the animation. The default duration is 300 milliseconds.
*
* @param duration The length of the animation, in milliseconds.
* @return ObjectAnimator The object called with setDuration(). This return
* value makes it easier to compose statements together that construct and then set the
* duration, as in
* <code>ObjectAnimator.ofInt(target, propertyName, 0, 10).setDuration(500).start()</code>.
*/
@Override
public ObjectAnimator setDuration(long duration) {
super.setDuration(duration);
return this;
}
/**
* The target object whose property will be animated by this animation
*
* @return The object being animated
*/
public Object getTarget() {
return mTarget;
}
/**
* Sets the target object whose property will be animated by this animation
*
* @param target The object being animated
*/
@Override
public void setTarget(Object target) {
if (mTarget != target) {
final Object oldTarget = mTarget;
mTarget = target;
if (oldTarget != null && target != null && oldTarget.getClass() == target.getClass()) {
return;
}
// New target type should cause re-initialization prior to starting
mInitialized = false;
}
}
@Override
public void setupStartValues() {
initAnimation();
int numValues = mValues.length;
for (int i = 0; i < numValues; ++i) {
mValues[i].setupStartValue(mTarget);
}
}
@Override
public void setupEndValues() {
initAnimation();
int numValues = mValues.length;
for (int i = 0; i < numValues; ++i) {
mValues[i].setupEndValue(mTarget);
}
}
/**
* This method is called with the elapsed fraction of the animation during every
* animation frame. This function turns the elapsed fraction into an interpolated fraction
* and then into an animated value (from the evaluator. The function is called mostly during
* animation updates, but it is also called when the <code>end()</code>
* function is called, to set the final value on the property.
* <p>
* <p>Overrides of this method must call the superclass to perform the calculation
* of the animated value.</p>
*
* @param fraction The elapsed fraction of the animation.
*/
@Override
void animateValue(float fraction) {
super.animateValue(fraction);
int numValues = mValues.length;
for (int i = 0; i < numValues; ++i) {
mValues[i].setAnimatedValue(mTarget);
}
}
@Override
public ObjectAnimator clone() {
final ObjectAnimator anim = (ObjectAnimator) super.clone();
return anim;
}
@Override
public String toString() {
String returnVal = "ObjectAnimator@" + Integer.toHexString(hashCode()) + ", target " +
mTarget;
if (mValues != null) {
for (int i = 0; i < mValues.length; ++i) {
returnVal += "\n " + mValues[i].toString();
}
}
return returnVal;
}
}

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/login_activity"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_white"
android:orientation="vertical"
android:weightSum="1">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/background_white"
app:titleTextAppearance="?android:attr/textAppearanceSmall"
app:popupTheme="@style/AppTheme"/>
<LinearLayout
android:id="@+id/loginHeader"
android:layout_width="match_parent"
android:layout_height="140dp"
android:orientation="vertical"
android:background="@color/background_white">
<!--<ImageView-->
<!--android:id="@+id/loginLogo"-->
<!--android:layout_width="80dp"-->
<!--android:layout_height="80dp"-->
<!--android:src="@drawable/logo_adi"-->
<!--android:layout_gravity="center"/>-->
<ImageView
android:id="@+id/logoMobile"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_marginTop="-30dp"
android:src="@drawable/icon_check_id"
android:layout_gravity="center"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/loginLayout">
<include
android:id="@+id/include1"
layout="@layout/footer" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/loginForm"
android:layout_margin="25dp">
<EditText
android:id="@+id/txtUser"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="center"
android:background="@drawable/rounded_corner_text_input"
android:drawableStart="@drawable/ic_person_black"
android:drawableLeft="@drawable/ic_person_black"
android:drawablePadding="10dp"
android:hint="@string/lblLoginId"
android:imeOptions="actionNext"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:nextFocusForward="@+id/txtPassword"
android:layout_marginBottom="20dp"
android:paddingStart="15dp"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="true"
app:hintEnabled="false"
app:boxStrokeColor="@null">
<EditText
android:id="@+id/txtPassword"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="center"
android:background="@drawable/rounded_corner_text_input"
android:drawableStart="@drawable/ic_lock_black"
android:drawableLeft="@drawable/ic_lock_black"
android:drawablePadding="10dp"
android:hint="@string/lblLoginPassword"
android:inputType="textPassword"
android:maxLines="1"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall" />
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
android:id="@+id/checkRememberMe"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/tv_darker"
android:layout_marginTop="15dp"
android:text="@string/lblRememberMe"
/>
<Button
android:id="@+id/btnLogin"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/login_button_background"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:text="@string/btnLogin"
android:textColor="@color/fontColorWhite"
android:textAppearance="?android:attr/textAppearanceSmall" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom">
<ImageView
android:id="@+id/loginLogo"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginBottom="-25dp"
android:src="@drawable/logo_adi"
android:layout_centerInParent="true" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</FrameLayout>

View file

@ -0,0 +1,24 @@
package com.adins.mss.foundation.print.rv.syncs;
import com.adins.mss.foundation.http.MssRequestType;
import java.util.Date;
/**
* Created by angga.permadi on 5/10/2016.
*/
public class SyncRVRequest extends MssRequestType {
private Date lastDtmCrt;
public SyncRVRequest() {
}
public Date getLastDtmCrt() {
return lastDtmCrt;
}
public void setLastDtmCrt(Date lastDtmCrt) {
this.lastDtmCrt = lastDtmCrt;
}
}