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,130 @@
package com.adins.mss.coll.fragments;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.os.Bundle;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentTransaction;
import androidx.recyclerview.widget.RecyclerView;
import android.util.Base64;
import android.widget.ImageView;
import android.widget.Toast;
import com.adins.mss.base.GlobalData;
import com.adins.mss.base.util.GsonHelper;
import com.adins.mss.base.util.Utility;
import com.adins.mss.coll.GetLogoKompetisiResponse;
import com.adins.mss.coll.NewMCMainActivity;
import com.adins.mss.coll.R;
import com.adins.mss.coll.dummy.MyDashboardItemDummyAdapter;
import com.adins.mss.coll.loyalti.pointacquisitionmonthly.MonthlyPointsChartView;
import com.adins.mss.constant.Global;
import com.adins.mss.dao.Kompetisi;
import com.adins.mss.dao.TaskH;
import com.adins.mss.foundation.formatter.Tool;
import com.adins.mss.foundation.http.HttpConnectionResult;
import com.adins.mss.foundation.http.HttpCryptedConnection;
import com.google.firebase.perf.FirebasePerformance;
import com.google.firebase.perf.metrics.HttpMetric;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.util.ArrayList;
import java.util.List;
public class GetLogoKompetisi extends AsyncTask<Void, Void, String> {
private Context context;
String errMsg = "";
public GetLogoKompetisiResponse logoKompetisiResponse;
String memberCode;
ImageView imageLogo;
public GetLogoKompetisi(Context mContext, String membership_program_code, ImageView logoKompetisi) {
context = mContext;
memberCode = membership_program_code;
imageLogo = logoKompetisi;
}
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected String doInBackground(Void... voids) {
if (Tool.isInternetconnected(context)) {
Gson gson = new GsonBuilder().setDateFormat("ddMMyyyyHHmmss").registerTypeHierarchyAdapter(byte[].class,
new GsonHelper.ByteArrayToBase64TypeAdapter()).create();
String result;
GetLogoRequest requestType = new GetLogoRequest();
// ArrayList<String> data = null;
// data = new ArrayList<>();
// for(int i = 0 ; i < dataKompetisireq.size() ; i++){
// data.add(dataKompetisireq.get(i).getMembershipProgramCode());
// }
requestType.setMEMBERSHIP_PROGRAM_CODE(memberCode);
requestType.setAudit(GlobalData.getSharedGlobalData().getAuditData());
// requestType.addItemToUnstructured(new KeyValue("imei", GlobalData.getSharedGlobalData().getImei()), false);
String json = GsonHelper.toJson(requestType);
String url = GlobalData.getSharedGlobalData().getURL_GET_LOGOKOMPETISI();
boolean encrypt = GlobalData.getSharedGlobalData().isEncrypt();
boolean decrypt = GlobalData.getSharedGlobalData().isDecrypt();
HttpCryptedConnection httpConn = new HttpCryptedConnection(context, encrypt, decrypt);
HttpConnectionResult serverResult = null;
//Firebase Performance Trace HTTP Request
HttpMetric networkMetric =
FirebasePerformance.getInstance().newHttpMetric(url, FirebasePerformance.HttpMethod.POST);
Utility.metricStart(networkMetric, json);
try {
serverResult = httpConn.requestToServer(url, json, Global.DEFAULTCONNECTIONTIMEOUT);
Utility.metricStop(networkMetric, serverResult);
} catch (Exception e) {
e.printStackTrace();
errMsg = e.getMessage();
return errMsg;
}
if(serverResult != null && serverResult.getStatusCode() == 200){
try {
logoKompetisiResponse = gson.fromJson(serverResult.getResult(), GetLogoKompetisiResponse.class);
} catch (Exception e) {
return e.getMessage();
}
}else {
errMsg = context.getString(R.string.failed_get_data_try_again);
}
return errMsg;
} else {
errMsg = context.getString(R.string.no_internet_connection);
return errMsg;
}
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
if (errMsg.length() > 0) {
Toast.makeText(context, errMsg, Toast.LENGTH_SHORT).show();
return;
}
String base64Logo = logoKompetisiResponse.getLOGO();
if(base64Logo != null && !base64Logo.equals("")){
byte[] decodedString = Base64.decode(base64Logo, Base64.DEFAULT );
Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
imageLogo.setImageBitmap(decodedByte);
}
}
}

View file

@ -0,0 +1,204 @@
package com.adins.mss.dao;
import com.adins.mss.dao.DaoSession;
import de.greenrobot.dao.DaoException;
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_COMMENT".
*/
public class Comment {
/** Not-null value. */
@SerializedName("uuid_comment")
private String uuid_comment;
@SerializedName("comment")
private String comment;
@SerializedName("dtm_crt_server")
private java.util.Date dtm_crt_server;
@SerializedName("sender_id")
private String sender_id;
@SerializedName("sender_name")
private String sender_name;
@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("uuid_timeline")
private String uuid_timeline;
/** Used to resolve relations */
private transient DaoSession daoSession;
/** Used for active entity operations. */
private transient CommentDao myDao;
private Timeline timeline;
private String timeline__resolvedKey;
public Comment() {
}
public Comment(String uuid_comment) {
this.uuid_comment = uuid_comment;
}
public Comment(String uuid_comment, String comment, java.util.Date dtm_crt_server, String sender_id, String sender_name, String usr_crt, java.util.Date dtm_crt, String usr_upd, java.util.Date dtm_upd, String uuid_timeline) {
this.uuid_comment = uuid_comment;
this.comment = comment;
this.dtm_crt_server = dtm_crt_server;
this.sender_id = sender_id;
this.sender_name = sender_name;
this.usr_crt = usr_crt;
this.dtm_crt = dtm_crt;
this.usr_upd = usr_upd;
this.dtm_upd = dtm_upd;
this.uuid_timeline = uuid_timeline;
}
/** called by internal mechanisms, do not call yourself. */
public void __setDaoSession(DaoSession daoSession) {
this.daoSession = daoSession;
myDao = daoSession != null ? daoSession.getCommentDao() : null;
}
/** Not-null value. */
public String getUuid_comment() {
return uuid_comment;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setUuid_comment(String uuid_comment) {
this.uuid_comment = uuid_comment;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public java.util.Date getDtm_crt_server() {
return dtm_crt_server;
}
public void setDtm_crt_server(java.util.Date dtm_crt_server) {
this.dtm_crt_server = dtm_crt_server;
}
public String getSender_id() {
return sender_id;
}
public void setSender_id(String sender_id) {
this.sender_id = sender_id;
}
public String getSender_name() {
return sender_name;
}
public void setSender_name(String sender_name) {
this.sender_name = sender_name;
}
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 String getUuid_timeline() {
return uuid_timeline;
}
public void setUuid_timeline(String uuid_timeline) {
this.uuid_timeline = uuid_timeline;
}
/** To-one relationship, resolved on first access. */
public Timeline getTimeline() {
String __key = this.uuid_timeline;
if (timeline__resolvedKey == null || timeline__resolvedKey != __key) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
TimelineDao targetDao = daoSession.getTimelineDao();
Timeline timelineNew = targetDao.load(__key);
synchronized (this) {
timeline = timelineNew;
timeline__resolvedKey = __key;
}
}
return timeline;
}
public void setTimeline(Timeline timeline) {
synchronized (this) {
this.timeline = timeline;
uuid_timeline = timeline == null ? null : timeline.getUuid_timeline();
timeline__resolvedKey = uuid_timeline;
}
}
/** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */
public void delete() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.delete(this);
}
/** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
}
/** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */
public void refresh() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.refresh(this);
}
}

View file

@ -0,0 +1,12 @@
package com.adins.mss.foundation.print.rv.syncs;
/**
* Created by angga.permadi on 5/10/2016.
*/
public interface SyncRvListener {
void onProgress();
void onError(SyncRVResponse response);
void onSuccess(SyncRVResponse response);
}

View file

@ -0,0 +1,25 @@
package com.adins.mss.odr.accounts.api;
import com.adins.mss.dao.Contact;
import com.adins.mss.foundation.http.MssResponseType;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* Created by olivia.dg on 11/17/2017.
*/
public class LoadContactResponse extends MssResponseType {
@SerializedName("listContact")
List<Contact> listContact;
public List<Contact> getListContact() {
return listContact;
}
public void setListContact(List<Contact> listContact) {
this.listContact = listContact;
}
}

View file

@ -0,0 +1,12 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.adins.mss.odr.products.ProductCreditSimulationFragment">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bgColor">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/btnRequest"/>
<Button
android:id="@+id/btnRequest"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_margin="5dp"
android:background="@drawable/button_background"
android:text="@string/reqFollowup"
android:textColor="@color/fontColorWhite"
android:layout_alignParentBottom="true"/>
</RelativeLayout>

View file

@ -0,0 +1,409 @@
package com.adins.mss.foundation.dialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.text.HtmlCompat;
import com.adins.mss.base.R;
import com.adins.mss.base.dynamictheme.DynamicTheme;
import com.adins.mss.base.dynamictheme.ThemeLoader;
import com.adins.mss.base.dynamictheme.ThemeUtility;
import com.adins.mss.foundation.dialog.gitonway.lib.ColorUtils;
import com.adins.mss.foundation.dialog.gitonway.lib.Effectstype;
import com.adins.mss.foundation.dialog.gitonway.lib.effects.BaseEffects;
/*
* Copyright 2014 litao
* https://github.com/sd6352051/NiftyDialogEffects
*
* 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.
*/
/**
* @author michael.bw
* <p>
* <p>
* <h1>
* <a id="user-content-usage" class="anchor" href="#usage" aria-hidden="true"><span class="octicon octicon-link"></span></a>Usage</h1>
* <div class="highlight highlight-java"><pre><span class="pl-stj">NiftyDialogBuilder</span> dialogBuilder<span class="pl-k">=</span><span class="pl-stj">NiftyDialogBuilder</span><span class="pl-k">.</span>getInstance(<span class="pl-v">this</span>);
* <p>
* dialogBuilder
* .withTitle(<span class="pl-s1"><span class="pl-pds">"</span>Modal Dialog<span class="pl-pds">"</span></span>)
* .withMessage(<span class="pl-s1"><span class="pl-pds">"</span>This is a modal Dialog.<span class="pl-pds">"</span></span>)
* .show();</pre></div>
* <br/>
* <p>
* <h1>
* <a id="user-content-usage" class="anchor" href="#usage" aria-hidden="true"><span class="octicon octicon-link"></span></a>Configuration</h1>
* <div class="highlight highlight-java"><pre>dialogBuilder
* .withTitle(<span class="pl-s1"><span class="pl-pds">"</span>Modal Dialog<span class="pl-pds">"</span></span>) <span class="pl-c">//.withTitle(null) no title</span>
* .withTitleColor(<span class="pl-s1"><span class="pl-pds">"</span>#FFFFFF<span class="pl-pds">"</span></span>) <span class="pl-c">//def</span>
* .withDividerColor(<span class="pl-s1"><span class="pl-pds">"</span>#11000000<span class="pl-pds">"</span></span>) <span class="pl-c">//def</span>
* .withMessage(<span class="pl-s1"><span class="pl-pds">"</span>This is a modal Dialog.<span class="pl-pds">"</span></span>) <span class="pl-c">//.withMessage(null) no Msg</span>
* .withMessageColor(<span class="pl-s1"><span class="pl-pds">"</span>#FFFFFFFF<span class="pl-pds">"</span></span>) <span class="pl-c">//def | withMessageColor(int resid)</span>
* .withDialogColor(<span class="pl-s1"><span class="pl-pds">"</span>#FFE74C3C<span class="pl-pds">"</span></span>) <span class="pl-c">//def | withDialogColor(int resid)</span>
* .withIcon(getResources()<span class="pl-k">.</span>getDrawable(<span class="pl-stj">R</span><span class="pl-k">.</span>drawable<span class="pl-k">.</span>icon))
* .withDuration(<span class="pl-c1">700</span>) <span class="pl-c">//def</span>
* .withEffect(effect) <span class="pl-c">//def Effectstype.Slidetop</span>
* .withButton1Text(<span class="pl-s1"><span class="pl-pds">"</span>OK<span class="pl-pds">"</span></span>) <span class="pl-c">//def gone</span>
* .withButton2Text(<span class="pl-s1"><span class="pl-pds">"</span>Cancel<span class="pl-pds">"</span></span>) <span class="pl-c">//def gone</span>
* .isCancelableOnTouchOutside(<span class="pl-c1">true</span>) <span class="pl-c">//def | isCancelable(true)</span>
* .setCustomView(<span class="pl-stj">R</span><span class="pl-k">.</span>layout<span class="pl-k">.</span>custom_view,v<span class="pl-k">.</span>getContext()) <span class="pl-c">//.setCustomView(View or ResId,context)</span>
* .setButton1Click(<span class="pl-k">new</span> <span class="pl-stj">View</span>.<span class="pl-stj">OnClickListener</span>() {
* <span class="pl-st">@Override</span>
* <span class="pl-s">public</span> <span class="pl-st">void</span> <span class="pl-en">onClick</span>(<span class="pl-stj">View</span> <span class="pl-v">v</span>) {
* <span class="pl-stj">Toast</span><span class="pl-k">.</span>makeText(v<span class="pl-k">.</span>getContext(), <span class="pl-s1"><span class="pl-pds">"</span>i'm btn1<span class="pl-pds">"</span></span>, <span class="pl-stj">Toast</span><span class="pl-c1"><span class="pl-k">.</span>LENGTH_SHORT</span>)<span class="pl-k">.</span>show();
* }
* })
* .setButton2Click(<span class="pl-k">new</span> <span class="pl-stj">View</span>.<span class="pl-stj">OnClickListener</span>() {
* <span class="pl-st">@Override</span>
* <span class="pl-s">public</span> <span class="pl-st">void</span> <span class="pl-en">onClick</span>(<span class="pl-stj">View</span> <span class="pl-v">v</span>) {
* <span class="pl-stj">Toast</span><span class="pl-k">.</span>makeText(v<span class="pl-k">.</span>getContext(),<span class="pl-s1"><span class="pl-pds">"</span>i'm btn2<span class="pl-pds">"</span></span>,<span class="pl-stj">Toast</span><span class="pl-c1"><span class="pl-k">.</span>LENGTH_SHORT</span>)<span class="pl-k">.</span>show();
* }
* })
* .show();</pre></div>
*/
public class NiftyDialogBuilder extends Dialog implements DialogInterface, ThemeLoader.ColorSetLoaderCallback {
private static Context tmpContext;
private static NiftyDialogBuilder instance;
private final String defTextColor = "#FFFFFFFF";
private final String defDividerColor = "#11000000";
private final String defMsgColor = "#FFFFFFFF";
private final String defDialogColor = "#FF5f5f5f";
private Effectstype type = null;
private LinearLayout mLinearLayoutView;
private RelativeLayout mRelativeLayoutView;
private LinearLayout mLinearLayoutMsgView;
private LinearLayout mLinearLayoutTopView;
private FrameLayout mFrameLayoutCustomView;
private View mDialogView;
private View mDivider;
private TextView mTitle;
private TextView mMessage;
private ImageView mIcon;
private Button mButton1;
private Button mButton2;
private int mDuration = -1;
private boolean isCancelable = true;
public NiftyDialogBuilder(Context context) {
super(context);
init(context);
}
public NiftyDialogBuilder(Context context, int theme) {
super(context, theme);
init(context);
}
public static NiftyDialogBuilder getInstance(Context context) {
if (instance == null || !context.equals(tmpContext)) {
synchronized (NiftyDialogBuilder.class) {
if (instance == null || !context.equals(tmpContext)) {
instance = new NiftyDialogBuilder(context, R.style.dialog_untran);
}
}
}
tmpContext = context;
return instance;
}
private void applyColorTheme(DynamicTheme dynamicTheme){
if(dynamicTheme != null && !dynamicTheme.getThemeItemList().isEmpty()){
int btnColorNormal = Color.parseColor(ThemeUtility.getColorItemValue(dynamicTheme,"btn_bg_normal"));
int btnColorPress = Color.parseColor(ThemeUtility.getColorItemValue(dynamicTheme,"btn_bg_pressed"));
//create color state list for button states
int[][] states = new int[][] {
new int[] { android.R.attr.state_pressed}, // pressed
new int[] {} // normal
};
int[] colorlist = new int[]{
btnColorPress,
btnColorNormal
};
ColorStateList colorStateList = new ColorStateList(states,colorlist);
ThemeUtility.setViewBackground(mButton1,colorStateList);
ThemeUtility.setViewBackground(mButton2,colorStateList);
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WindowManager.LayoutParams params = getWindow().getAttributes();
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
params.width = ViewGroup.LayoutParams.MATCH_PARENT;
getWindow().setAttributes((android.view.WindowManager.LayoutParams) params);
}
@Override
protected void onStop() {
super.onStop();
tmpContext = null;
}
private void init(Context context) {
mDialogView = View.inflate(context, R.layout.dialog_layout, null);
mLinearLayoutView = (LinearLayout) mDialogView.findViewById(R.id.parentPanel);
mRelativeLayoutView = (RelativeLayout) mDialogView.findViewById(R.id.main);
mLinearLayoutTopView = (LinearLayout) mDialogView.findViewById(R.id.topPanel);
mLinearLayoutMsgView = (LinearLayout) mDialogView.findViewById(R.id.contentPanel);
mFrameLayoutCustomView = (FrameLayout) mDialogView.findViewById(R.id.customPanel);
mTitle = (TextView) mDialogView.findViewById(R.id.alertTitle);
mMessage = (TextView) mDialogView.findViewById(R.id.message);
mIcon = (ImageView) mDialogView.findViewById(R.id.icon);
mButton1 = (Button) mDialogView.findViewById(R.id.button1);
mButton2 = (Button) mDialogView.findViewById(R.id.button2);
mMessage.setMovementMethod(LinkMovementMethod.getInstance());
setContentView(mDialogView);
this.setOnShowListener(new OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
mLinearLayoutView.setVisibility(View.VISIBLE);
if (type == null) {
type = Effectstype.Slidetop;
}
start(type);
}
});
mRelativeLayoutView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (isCancelable) dismiss();
}
});
loadSavedTheme(context);
}
private void loadSavedTheme(Context context){
ThemeLoader themeLoader = new ThemeLoader(context);
themeLoader.loadSavedColorSet(this);
}
public void toDefault() {
mTitle.setTextColor(Color.parseColor(defTextColor));
mDivider.setBackgroundColor(Color.parseColor(defDividerColor));
mMessage.setTextColor(Color.parseColor(defMsgColor));
mLinearLayoutView.setBackgroundColor(Color.parseColor(defDialogColor));
}
public NiftyDialogBuilder withDividerColor(String colorString) {
mDivider.setBackgroundColor(Color.parseColor(colorString));
return this;
}
public NiftyDialogBuilder withDividerColor(int color) {
mDivider.setBackgroundColor(color);
return this;
}
public NiftyDialogBuilder withTitle(CharSequence title) {
toggleView(mLinearLayoutTopView, title);
mTitle.setText(title);
return this;
}
public NiftyDialogBuilder withTitleColor(String colorString) {
mTitle.setTextColor(Color.parseColor(colorString));
return this;
}
public NiftyDialogBuilder withTitleColor(int color) {
mTitle.setTextColor(color);
return this;
}
public NiftyDialogBuilder withMessage(int textResId) {
toggleView(mLinearLayoutMsgView, textResId);
mMessage.setText(textResId);
return this;
}
public NiftyDialogBuilder withMessage(CharSequence msg) {
toggleView(mLinearLayoutMsgView, msg);
mMessage.setText(msg);
return this;
}
public NiftyDialogBuilder withMessageColor(String colorString) {
mMessage.setTextColor(Color.parseColor(colorString));
return this;
}
public NiftyDialogBuilder withMessageColor(int color) {
mMessage.setTextColor(color);
return this;
}
public NiftyDialogBuilder withDialogColor(String colorString) {
mLinearLayoutView.getBackground().setColorFilter(ColorUtils.getColorFilter(Color.parseColor(colorString)));
return this;
}
public NiftyDialogBuilder withDialogColor(int color) {
mLinearLayoutView.getBackground().setColorFilter(ColorUtils.getColorFilter(color));
return this;
}
public NiftyDialogBuilder withIcon(int drawableResId) {
mIcon.setImageResource(drawableResId);
return this;
}
public NiftyDialogBuilder withIcon(Drawable icon) {
mIcon.setImageDrawable(icon);
return this;
}
public NiftyDialogBuilder withDuration(int duration) {
this.mDuration = duration;
return this;
}
public NiftyDialogBuilder withEffect(Effectstype type) {
this.type = type;
return this;
}
public NiftyDialogBuilder withButtonDrawable(int resid) {
mButton1.setBackgroundResource(resid);
mButton2.setBackgroundResource(resid);
return this;
}
public NiftyDialogBuilder withButton1Text(CharSequence text) {
mButton1.setVisibility(View.VISIBLE);
mButton1.setText(text);
return this;
}
public NiftyDialogBuilder withButton2Text(CharSequence text) {
mButton2.setVisibility(View.VISIBLE);
mButton2.setText(text);
return this;
}
public NiftyDialogBuilder setButton1Click(View.OnClickListener click) {
mButton1.setOnClickListener(click);
return this;
}
public NiftyDialogBuilder setButton2Click(View.OnClickListener click) {
mButton2.setOnClickListener(click);
return this;
}
public NiftyDialogBuilder setCustomView(int resId, Context context) {
View customView = View.inflate(context, resId, null);
if (mFrameLayoutCustomView.getChildCount() > 0) {
mFrameLayoutCustomView.removeAllViews();
}
mFrameLayoutCustomView.addView(customView);
return this;
}
public NiftyDialogBuilder setCustomView(View view, Context context) {
if (mFrameLayoutCustomView.getChildCount() > 0) {
mFrameLayoutCustomView.removeAllViews();
}
mFrameLayoutCustomView.addView(view);
return this;
}
public NiftyDialogBuilder isCancelableOnTouchOutside(boolean cancelable) {
this.isCancelable = cancelable;
this.setCanceledOnTouchOutside(cancelable);
return this;
}
public NiftyDialogBuilder isCancelable(boolean cancelable) {
this.isCancelable = cancelable;
this.setCancelable(cancelable);
return this;
}
private void toggleView(View view, Object obj) {
if (obj == null) {
view.setVisibility(View.GONE);
} else {
view.setVisibility(View.VISIBLE);
}
}
@Override
public void show() {
super.show();
}
private void start(Effectstype type) {
BaseEffects animator = type.getAnimator();
if (mDuration != -1) {
animator.setDuration(Math.abs(mDuration));
}
animator.start(mRelativeLayoutView);
}
@Override
public void dismiss() {
super.dismiss();
mButton1.setVisibility(View.GONE);
mButton2.setVisibility(View.GONE);
}
@Override
public void onHasLoaded(DynamicTheme dynamicTheme) {
if(dynamicTheme != null && !dynamicTheme.getThemeItemList().isEmpty()){
applyColorTheme(dynamicTheme);
}
}
@Override
public void onHasLoaded(DynamicTheme dynamicTheme, boolean needUpdate) {
//EMPTY
}
}

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bgColor">
<ExpandableListView
android:id="@+id/resultOrderlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:divider="@android:color/white"
android:childDivider="@android:color/white"
android:dividerHeight="2dp"
android:fadingEdge="none"/>
</RelativeLayout>

View file

@ -0,0 +1,50 @@
package com.adins.mss.coll.models;
import com.adins.mss.dao.InstallmentSchedule;
import com.adins.mss.foundation.http.MssResponseType;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* Created by adityapurwa on 06/05/15.
*/
public class InstallmentScheduleResponse extends MssResponseType {
//private List<InstallmentScheduleItem> installmentScheduleList;
@SerializedName("installmentScheduleList")
private List<InstallmentSchedule> installmentScheduleList;
@SerializedName("agreementNo")
private String agreementNo;
public String getAgreementNo() {
return this.agreementNo;
}
public void setAgreementNo(String value) {
this.agreementNo = value;
}
public InstallmentScheduleResponse() {
}
public List<InstallmentSchedule> getInstallmentScheduleList() {
return installmentScheduleList;
}
public void setInstallmentScheduleList(
List<InstallmentSchedule> installmentScheduleList) {
this.installmentScheduleList = installmentScheduleList;
}
// public List<InstallmentScheduleItem> getInstallmentScheduleList() {
// return installmentScheduleList;
// }
//
// public void setInstallmentScheduleList(List<InstallmentScheduleItem> installmentScheduleList) {
// this.installmentScheduleList = installmentScheduleList;
// }
}

View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:id="@+id/canvasLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_above="@+id/btnLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:id="@+id/btnLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/padding_small"
android:background="@color/tv_white"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:weightSum="1"
android:gravity="right" >
<Button
android:id="@+id/btnEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@drawable/button_background"
android:drawableLeft="@drawable/icon_edit_32"/>
<Button
android:id="@+id/btnErase"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@drawable/button_background"
android:drawableLeft="@drawable/icon_erase_32"/>
<Button
android:id="@+id/btnClear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@drawable/button_background"
android:drawableLeft="@drawable/icon_clear_32" />
<Button
android:id="@+id/btnSave"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@drawable/button_background"
android:drawableLeft="@drawable/icon_check_32" />
</LinearLayout>
</RelativeLayout>

View file

@ -0,0 +1,183 @@
package com.adins.mss.dao;
import com.adins.mss.dao.DaoSession;
import de.greenrobot.dao.DaoException;
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_DEPOSITREPORT_D".
*/
public class DepositReportD {
/** Not-null value. */
@SerializedName("uuid_deposit_report_d")
private String uuid_deposit_report_d;
@SerializedName("uuid_task_h")
private String uuid_task_h;
@SerializedName("deposit_amt")
private String deposit_amt;
@SerializedName("usr_crt")
private String usr_crt;
@SerializedName("dtm_crt")
private java.util.Date dtm_crt;
@SerializedName("uuid_deposit_report_h")
private String uuid_deposit_report_h;
@SerializedName("is_sent")
private String is_sent;
@ExcludeFromGson
@SerializedName("agreement_no")
private String agreement_no;
/** Used to resolve relations */
private transient DaoSession daoSession;
/** Used for active entity operations. */
private transient DepositReportDDao myDao;
private DepositReportH depositReportH;
private String depositReportH__resolvedKey;
public DepositReportD() {
}
public DepositReportD(String uuid_deposit_report_d) {
this.uuid_deposit_report_d = uuid_deposit_report_d;
}
public DepositReportD(String uuid_deposit_report_d, String uuid_task_h, String deposit_amt, String usr_crt, java.util.Date dtm_crt, String uuid_deposit_report_h, String is_sent, String agreement_no) {
this.uuid_deposit_report_d = uuid_deposit_report_d;
this.uuid_task_h = uuid_task_h;
this.deposit_amt = deposit_amt;
this.usr_crt = usr_crt;
this.dtm_crt = dtm_crt;
this.uuid_deposit_report_h = uuid_deposit_report_h;
this.is_sent = is_sent;
this.agreement_no = agreement_no;
}
/** called by internal mechanisms, do not call yourself. */
public void __setDaoSession(DaoSession daoSession) {
this.daoSession = daoSession;
myDao = daoSession != null ? daoSession.getDepositReportDDao() : null;
}
/** Not-null value. */
public String getUuid_deposit_report_d() {
return uuid_deposit_report_d;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setUuid_deposit_report_d(String uuid_deposit_report_d) {
this.uuid_deposit_report_d = uuid_deposit_report_d;
}
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 getDeposit_amt() {
return deposit_amt;
}
public void setDeposit_amt(String deposit_amt) {
this.deposit_amt = deposit_amt;
}
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 getUuid_deposit_report_h() {
return uuid_deposit_report_h;
}
public void setUuid_deposit_report_h(String uuid_deposit_report_h) {
this.uuid_deposit_report_h = uuid_deposit_report_h;
}
public String getIs_sent() {
return is_sent;
}
public void setIs_sent(String is_sent) {
this.is_sent = is_sent;
}
public String getAgreement_no() {
return agreement_no;
}
public void setAgreement_no(String agreement_no) {
this.agreement_no = agreement_no;
}
/** To-one relationship, resolved on first access. */
public DepositReportH getDepositReportH() {
String __key = this.uuid_deposit_report_h;
if (depositReportH__resolvedKey == null || depositReportH__resolvedKey != __key) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
DepositReportHDao targetDao = daoSession.getDepositReportHDao();
DepositReportH depositReportHNew = targetDao.load(__key);
synchronized (this) {
depositReportH = depositReportHNew;
depositReportH__resolvedKey = __key;
}
}
return depositReportH;
}
public void setDepositReportH(DepositReportH depositReportH) {
synchronized (this) {
this.depositReportH = depositReportH;
uuid_deposit_report_h = depositReportH == null ? null : depositReportH.getUuid_deposit_report_h();
depositReportH__resolvedKey = uuid_deposit_report_h;
}
}
/** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */
public void delete() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.delete(this);
}
/** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
}
/** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */
public void refresh() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.refresh(this);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB