Commit d2e7235d by sikang

UPDATE

parent 027c5d47
......@@ -110,14 +110,16 @@ dependencies {
//camerakit
api 'com.wonderkiln:camerakit:0.13.1'
//facebook accountKit
//facebook accountKit SDK
api 'com.facebook.android:account-kit-sdk:4.37.0'
api 'com.google.android.gms:play-services-auth:15.0.1'
api 'com.google.android.gms:play-services-auth-api-phone:15.0.1'
//facebook SDK
// api 'com.facebook.android:facebook-android-sdk:[4,5)'
//AppsFlyer
// api 'com.appsflyer:af-android-sdk:4+@aar'
// api 'com.android.installreferrer:installreferrer:1.0'
api 'com.appsflyer:af-android-sdk:4+@aar'
//zendesk
api group: 'com.zendesk', name: 'support', version: '2.1.1'
......
......@@ -331,6 +331,7 @@
#
-keep class com.appsflyer.** {*;}
-keep interface com.appsflyer.** {*;}
-dontwarn com.android.installreferrer
#
-keep class java.** {*;}
......
......@@ -107,7 +107,7 @@
<!--Facebook AccountKit-->
<meta-data
android:name="com.facebook.accountkit.ApplicationName"
android:value="@string/app_name" />
android:value="@string/app_name_str" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/FACEBOOK_APP_ID" />
......@@ -138,6 +138,42 @@
android:name=".mvp.ui.activity.TakePhotoActivity"
android:screenOrientation="portrait" />
<!--还款指南-->
<activity
android:name=".mvp.ui.activity.RepaymentGuideActivity"
android:screenOrientation="portrait" />
<!--Web-->
<activity
android:name=".mvp.ui.activity.WebActivity"
android:screenOrientation="portrait" />
<!--注册协议和隐私政策-->
<activity
android:name=".mvp.ui.activity.AgreementPolicyActivity"
android:screenOrientation="portrait" />
<!--帮助中心-->
<activity
android:name=".mvp.ui.activity.HelpCenterActivity"
android:screenOrientation="portrait" />
<!--关于我们-->
<activity
android:name=".mvp.ui.activity.AboutUsActivity"
android:screenOrientation="portrait" />
<!--活动中心-->
<activity
android:name=".mvp.ui.activity.ActivityCenter"
android:screenOrientation="portrait" />
<!--活动中心-->
<activity
android:name=".mvp.ui.activity.MessageListActivity"
android:screenOrientation="portrait" />
<receiver
android:name="com.appsflyer.MultipleInstallBroadcastReceiver"
......@@ -149,7 +185,9 @@
<receiver
android:name=".broadcast.InstallReferrerReceiver"
android:exported="true">
android:enabled="true"
android:exported="true"
android:permission="android.permission.INSTALL_PACKAGES">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
......
......@@ -5,6 +5,7 @@ import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import com.google.firebase.FirebaseApp;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
......@@ -23,6 +24,7 @@ import tech.starwin.network.Gateway;
import tech.starwin.utils.FireBaseHelper;
import tech.starwin.utils.PreferencesManager;
import tech.starwin.utils.collection.UploadManager;
import tech.starwin.utils.ui_utils.UIHelper;
import zendesk.core.AnonymousIdentity;
import zendesk.core.Zendesk;
import zendesk.support.Support;
......@@ -50,7 +52,7 @@ public class LibConfig {
public static String AGREEMENT_URL;
public static String APP_URL;
public static String BUGLY_APP_ID;
public static String CONTRACT_URL;
public static String PRIVACY_POLICY;
public static String HOTLINE;
public static String LOAN_AGREEMENT;
public static String LOGIN_ACTIVITY_ACTION;
......@@ -66,11 +68,13 @@ public class LibConfig {
public static String TONGDUN_PARENT_CODE;
public static String TONGDUN_PARENT_KEY;
public static String AF_DEV_KEY;
public static String LANGUAGE = "en";
public static String XH_CHANNEL_NAME;
public static String LANGUAGE = "in";
public static int HARVESTER_PORT;//
public static int LOADING_ICON;//loading图标
public static int LOADING_BACKGROUND;//loading旋转背景
public static int MAIN_COLOR;//主题色
public static int APP_ICON = R.mipmap.ic_launcher;
public static int MAIN_COLOR = R.color.color_blue;//主题色
public static ButterKnifeBinder butterKnifeBinder;
......@@ -91,9 +95,10 @@ public class LibConfig {
//上传工具
UploadManager.init(CONTEXT);
//init FireBase RemoteConfig
//init FireBase
FirebaseApp.initializeApp(CONTEXT);
//RemoteConfig
initFirebaseRemoteConfig();
// initFirebaseRemoteConfig();
//init SharePreferences
PreferencesManager.get().init(application);
......@@ -132,20 +137,24 @@ public class LibConfig {
* init zendesk
*/
private static void initZendesk(Application application) {
Zendesk.INSTANCE.init(application, ZENDESK_URL, ZENDESK_APP_ID, ZENDESK_OAUTH_CLIENT_ID);
Support.INSTANCE.init(Zendesk.INSTANCE);
Zendesk.INSTANCE.setIdentity(new AnonymousIdentity());//匿名身份
if (!TextUtils.isEmpty(ZENDESK_URL) && !TextUtils.isEmpty(ZENDESK_APP_ID) && !TextUtils.isEmpty(ZENDESK_OAUTH_CLIENT_ID)) {
Zendesk.INSTANCE.init(application, ZENDESK_URL, ZENDESK_APP_ID, ZENDESK_OAUTH_CLIENT_ID);
Support.INSTANCE.init(Zendesk.INSTANCE);
Zendesk.INSTANCE.setIdentity(new AnonymousIdentity());//匿名身份
}
}
/**
* init 同盾
*/
private static void initTD() {
OctopusManager.getInstance().init(CONTEXT, TONGDUN_PARENT_CODE, TONGDUN_PARENT_KEY);
OctopusManager.getInstance().setPrimaryColorResId(MAIN_COLOR);
OctopusManager.getInstance().setTitleColorResId(R.color.white);
OctopusManager.getInstance().setShowWarnDialog(true);
OctopusManager.getInstance().setStatusBarBg(MAIN_COLOR);
if (!TextUtils.isEmpty(TONGDUN_PARENT_CODE) && !TextUtils.isEmpty(TONGDUN_PARENT_KEY)) {
OctopusManager.getInstance().init(CONTEXT, TONGDUN_PARENT_CODE, TONGDUN_PARENT_KEY);
OctopusManager.getInstance().setPrimaryColorResId(MAIN_COLOR);
OctopusManager.getInstance().setTitleColorResId(R.color.white);
OctopusManager.getInstance().setShowWarnDialog(true);
OctopusManager.getInstance().setStatusBarBg(MAIN_COLOR);
}
}
......
......@@ -37,6 +37,7 @@ import tech.starwin.utils.context_utils.FragmentLauncher;
import tech.starwin.utils.ui_utils.DialogFactory;
import tech.starwin.utils.ui_utils.QMUIHelper;
import tech.starwin.widget.ProgressDialog;
import tech.starwin.widget.TopBar;
/**
* Created by SiKang on 2018/9/14.
......@@ -51,7 +52,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
/**
* TopBar
*/
private QMUITopBar mTopBar;
private TopBar mTopBar;
/**
* 创建和缓存Presenter实例
......@@ -165,7 +166,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
@Override
public void onHttpStart(String action, boolean isShowLoading) {
if (isShowLoading) {
if (isShowLoading && !progressDialog.isShowing()) {
//500ms后如果还没有收到返回数据,显示loading
progressDialog.setEnable(true);
rootLayout.postDelayed(() -> progressDialog.showLoading(), 500);
......@@ -242,6 +243,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
return true;
}
/**
* 是否使用侧滑
*/
......@@ -254,8 +256,8 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
* 初始化TopBar,需要自定义TopBar样式时重写
* 默认TopBar只包含一个BackButton 和 Titile
*/
protected void initTopBar(QMUITopBar topBar) {
topBar.addLeftBackImageButton().setOnClickListener(new View.OnClickListener() {
protected void initTopBar(TopBar topBar) {
topBar.toolBar().addLeftBackImageButton().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
......@@ -265,7 +267,8 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
public void setTopBarTitle(String title) {
if (title != null && mTopBar != null) {
mTopBar.setTitle(title);
// mTopBar.setTitle(title);
mTopBar.toolBar().setTitle(title);
}
}
......@@ -340,4 +343,13 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
}
}
public void finishDelayed(int ms) {
rootLayout.postDelayed(new Runnable() {
@Override
public void run() {
finish();
}
}, ms);
}
}
......@@ -35,10 +35,7 @@ public abstract class BaseApplication extends MultiDexApplication {
/**
* before onCreate()
* */
*/
public abstract void initLibCnofig();
public abstract void afterOnCreate();
}
......@@ -28,6 +28,7 @@ import tech.starwin.utils.ui_utils.DialogFactory;
import tech.starwin.utils.ui_utils.QMUIHelper;
import tech.starwin.widget.ProgressDialog;
import tech.starwin.utils.ui_utils.UIHelper;
import tech.starwin.widget.TopBar;
/**
* Created by SiKang on 2018/9/16.
......@@ -39,7 +40,7 @@ public abstract class BaseFragment extends Fragment implements IView {
/**
* TopBar
*/
private QMUITopBar mTopBar;
private TopBar mTopBar;
/**
* 创建和缓存Presenter实例
......@@ -126,8 +127,8 @@ public abstract class BaseFragment extends Fragment implements IView {
* 初始化TopBar,需要自定义TopBar样式时重写
* 默认TopBar只包含一个BackButton 和 Titile
*/
protected void initTopBar(QMUITopBar topBar) {
mTopBar.addLeftBackImageButton().setOnClickListener(new View.OnClickListener() {
protected void initTopBar(TopBar topBar) {
mTopBar.toolBar().addLeftBackImageButton().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
UIHelper.doBack();
......
......@@ -57,7 +57,7 @@ public abstract class BaseRecyclerAdapter<T> extends RecyclerView.Adapter<Recycl
}
@Override
public void onBindViewHolder(RecyclerViewHolder holder, int position) {
public final void onBindViewHolder(RecyclerViewHolder holder, int position) {
bindData(holder, position, mData.get(position));
}
......
......@@ -4,6 +4,7 @@ import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
......@@ -56,5 +57,14 @@ public class RecyclerViewHolder extends RecyclerView.ViewHolder {
return (EditText) getView(viewId);
}
public RecyclerView getRecyclerView(int viewId) {
return (RecyclerView) getView(viewId);
}
public CheckBox getCheckBox(int viewId) {
return (CheckBox) getView(viewId);
}
}
......@@ -27,10 +27,7 @@ import tech.starwin.utils.collection.UploadManager;
public class InstallReferrerReceiver extends BroadcastReceiver {
public static String install_referrer_store_key = "GA_install_referrer_store_key";
public void onReceive(Context context, Intent data) {
PreferencesManager.get().saveInstallReferrer(getReferrerValue(data.getExtras()));
}
......
......@@ -2,12 +2,16 @@ package tech.starwin.impl;
import com.google.gson.Gson;
import org.greenrobot.eventbus.EventBus;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import retrofit2.HttpException;
import tech.starwin.R;
import tech.starwin.LibConfig;
import tech.starwin.mvp.beans.BasicAck;
import tech.starwin.mvp.beans.ResponseErrorBody;
import tech.starwin.mvp.beans.UpdateBean;
import tech.starwin.network.Error;
import tech.starwin.utils.LoginManager;
......@@ -89,8 +93,11 @@ public abstract class HttpObserver<T> implements Observer<T> {
onError(Error.SERVER_ERROR, LibConfig.getContext().getString(R.string.show_not_login_yet));
return true;
case 409:
Gson gson = new Gson();
// 版本更新
onError(Error.SERVER_ERROR, "need update");
BasicAck result = gson.fromJson(exception.response().body().toString(), BasicAck.class);
UpdateBean updateBean = gson.fromJson(result.getData(), UpdateBean.class);
EventBus.getDefault().post(updateBean);
return true;
case 412:
// 参数缺失
......
......@@ -262,7 +262,7 @@ public interface UserApi {
* 获取活动Bannder信息
*/
@GET("banner")
Observable<ArrayList<ActivityInfoBean>> getActivityList();
Observable<List<ActivityInfoBean>> getActivityList();
/**
* 贷款详情
......
......@@ -8,4 +8,20 @@ import java.io.Serializable;
public class ActivityInfoBean implements Serializable{
private String url;
private String detailUrl;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getDetailUrl() {
return detailUrl;
}
public void setDetailUrl(String detailUrl) {
this.detailUrl = detailUrl;
}
}
......@@ -17,6 +17,9 @@ public class GatewayInfoBean implements Serializable {
@SerializedName("harvester")
public List<String> harvester;
@SerializedName("repay")
public List<String> repay;
@SerializedName("admin")
public List<String> admin;
......
package tech.starwin.mvp.beans;
/**
* Created by SiKang on 2018/11/17.
*/
public class RepaymentGuideBean {
private String guideTitle;
private String guideDetail;
public RepaymentGuideBean(String guideTitle, String guideDetail) {
this.guideTitle = guideTitle;
this.guideDetail = guideDetail;
}
public String getGuideTitle() {
return guideTitle;
}
public void setGuideTitle(String guideTitle) {
this.guideTitle = guideTitle;
}
public String getGuideDetail() {
return guideDetail;
}
public void setGuideDetail(String guideDetail) {
this.guideDetail = guideDetail;
}
}
package tech.starwin.mvp.beans;
import java.util.ArrayList;
/**
* Created by SiKang on 2018/11/20.
*/
public class UpdateBean {
private int latestVersionCode;
private String latestVersion;
private ArrayList<String> releaseNotes;
public int getLatestVersionCode() {
return latestVersionCode;
}
public void setLatestVersionCode(int latestVersionCode) {
this.latestVersionCode = latestVersionCode;
}
public String getLatestVersion() {
return latestVersion;
}
public void setLatestVersion(String latestVersion) {
this.latestVersion = latestVersion;
}
public ArrayList<String> getReleaseNotes() {
return releaseNotes;
}
public void setReleaseNotes(ArrayList<String> releaseNotes) {
this.releaseNotes = releaseNotes;
}
public String getReleaseNotesStr() {
if (releaseNotes == null || releaseNotes.size() == 0) {
return "";
}
StringBuffer buffer = new StringBuffer();
for (String note : releaseNotes) {
buffer.append(note + "\n");
}
buffer.deleteCharAt(buffer.length() - 1);
return buffer.toString();
}
}
......@@ -64,13 +64,6 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
});
}
/**
* 上传工作证件照片
*/
@SuppressLint("CheckResult")
public void uploadEmploymentImg(final String action, EmploymentBean employmentBean, @NonNull File file) {
handleRequest(action, apiService.uploadPhoto(MultipartBodyMaker.makeSimplePart("file", file), "EMPLOYMENT_PHOTO", LoginManager.get().getToken()));
}
/**
* 上传依图 截取得帧图片
......
......@@ -208,6 +208,22 @@ public class UserPresenter extends BasePresenter<UserApi> {
}
/**
* 活动中心数据
*/
public void getActivitys(String action) {
handleRequest(action, apiService.getActivityList());
}
/**
* 消息列表
*/
public void getMsgList(String action) {
handleRequest(action, apiService.getMsgInbox(LoginManager.get().getToken()));
}
// @SuppressLint("CheckResult")
// public void getUserInfo(final String action) {
// LoanApi loanApi = ServiceGenerator.getService(LoanApi.class);
......@@ -358,7 +374,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
}
/**
* 客户服务热线、公司介绍
* 客户服务热线、公司介绍
*/
public void getCustomerMsg(String action) {
handleRequest(action, apiService.display());
......
package tech.starwin.mvp.ui.activity;
import android.content.Context;
import android.text.TextUtils;
import android.widget.TextView;
import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.mvp.beans.DisplayBean;
import tech.starwin.mvp.presenter.UserPresenter;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.ui_utils.DialogFactory;
import tech.starwin.utils.ui_utils.QMUIHelper;
import tech.starwin.widget.PageStateLayout;
/**
* Created by SiKang on 2018/11/1.
*/
public class AboutUsActivity extends BaseActivity {
TextView mAboutTv;
PageStateLayout stateLayout;
public static void start(Context context) {
new ActivityJumper.Builder(context, AboutUsActivity.class).build().start();
}
@Override
public int bindLayout() {
return R.layout.actiivty_about_us;
}
@Override
public void initView() {
setTopBarTitle(getString(R.string.text_about));
mAboutTv = findViewById(R.id.activity_about_us_tv);
stateLayout = QMUIHelper.bindEmptyView(mAboutTv, getString(R.string.text_temporarily_no_data), "Retry", new PageStateLayout.OnRetryListener() {
@Override
public void onRetry() {
getPresenter(UserPresenter.class).getCustomerMsg("action_aboutUs");
}
});
getPresenter(UserPresenter.class).getCustomerMsg("action_aboutUs");
}
@Override
public void onHttpSuccess(String action, Object result) {
if ("action_aboutUs".equals(action)) {
DisplayBean displayBean = (DisplayBean) result;
if (!TextUtils.isEmpty(displayBean.getDescription())) {
mAboutTv.setText(displayBean.getDescription());
} else {
stateLayout.showEmpty();
}
}
}
}
package tech.starwin.mvp.ui.activity;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import java.util.List;
import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.mvp.beans.ActivityInfoBean;
import tech.starwin.mvp.presenter.UserPresenter;
import tech.starwin.mvp.ui.adapter.ActivityCenterAdapter;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.ui_utils.UIHelper;
/**
* Created by SiKang on 2018/11/20.
*/
public class ActivityCenter extends BaseActivity {
public static void start(Context context) {
new ActivityJumper.Builder(context, ActivityCenter.class).build().start();
}
@Override
public int bindLayout() {
return R.layout.simple_recyclerview;
}
@Override
public void initView() {
setTopBarTitle(getString(R.string.text_activity_center));
getPresenter(UserPresenter.class).getActivitys("action_getActivitys");
}
@Override
public void onHttpSuccess(String action, Object result) {
RecyclerView recyclerView = findViewById(R.id.simple_recyclerview);
List<ActivityInfoBean> activityList = (List<ActivityInfoBean>) result;
ActivityCenterAdapter adapter = new ActivityCenterAdapter(ActivityCenter.this, activityList);
UIHelper.bindAdapter(recyclerView, adapter);
}
}
package tech.starwin.mvp.ui.activity;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.FragmentActivity;
import android.view.Gravity;
import android.view.View;
import android.webkit.WebView;
import android.widget.CheckBox;
import tech.starwin.LibConfig;
import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.impl.OnEventClickListener;
import tech.starwin.utils.PreferencesManager;
import tech.starwin.utils.context_utils.EasyActivityResult;
import tech.starwin.utils.ui_utils.DialogFactory;
import tech.starwin.utils.ui_utils.UIHelper;
import tech.starwin.widget.TopBar;
/**
* Created by SiKang on 2018/11/19.
* 注册协议及隐私政策
*/
public class AgreementPolicyActivity extends BaseActivity {
public static void startForResult(FragmentActivity activity, int requestCode, EasyActivityResult.OnResultListener listener) {
Intent intent = new Intent(activity, AgreementPolicyActivity.class);
new EasyActivityResult(activity).startForResult(intent, requestCode, listener);
}
CheckBox mCheckBox;
WebView webView;
@Override
public int bindLayout() {
return R.layout.activity_policy;
}
@Override
protected void initTopBar(TopBar topBar) {
topBar.toolBar().setTitleGravity(Gravity.CENTER);
topBar.toolBar().setTitle(R.string.login_statement_title);
}
@Override
public void initView() {
mCheckBox = findViewById(R.id.activity_policy_checkbox);
webView = findViewById(R.id.activity_policy_webview);
UIHelper.bindClickListener(getContentView(), new OnEventClickListener() {
@Override
public void onEventClick(View v) {
if (v.getId() == R.id.activity_policy_ok_btn) {
if (mCheckBox.isChecked()) {
PreferencesManager.get().setPolicyStatus(true);
setResult(Activity.RESULT_OK);
finish();
} else {
DialogFactory.showMessageDialog(AgreementPolicyActivity.this, getString(R.string.check_the_checkbox));
}
}
}
}, R.id.activity_policy_ok_btn);
webView.loadUrl(LibConfig.AGREEMENT_URL);
}
@Override
public void onHttpSuccess(String action, Object result) {
}
}
package tech.starwin.mvp.ui.activity;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.mvp.beans.LoanAppHelpCenterTipsBean;
import tech.starwin.mvp.ui.adapter.HelpCenterAdapter;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.ui_utils.UIHelper;
/**
* Created by SiKang on 2018/11/1.
*/
public class HelpCenterActivity extends BaseActivity {
public static void start(Context context, String[] questionTips) {
new ActivityJumper.Builder(context, HelpCenterActivity.class)
.put("questionTips", questionTips)
.build().start();
}
@Override
public int bindLayout() {
return R.layout.activity_help_center;
}
@Override
public void initView() {
setTopBarTitle(getString(R.string.text_me_help_center));
RecyclerView mHelpRv = findViewById(R.id.activity_helpCenter_rv);
UIHelper.bindAdapter(mHelpRv, new HelpCenterAdapter(this, getHelpData()));
}
private List<LoanAppHelpCenterTipsBean> getHelpData() {
List<LoanAppHelpCenterTipsBean> data = new ArrayList<>();
String[] questions = getResources().getStringArray(R.array.text_helpcenter_questions);
String[] tips = (String[]) getIntent().getSerializableExtra("questionTips");
for (int i = 0; i < questions.length; i++) {
LoanAppHelpCenterTipsBean bean = new LoanAppHelpCenterTipsBean();
bean.mTitle = questions[i];
bean.mDetail = tips[i];
data.add(bean);
}
return data;
}
@Override
public void onHttpSuccess(String action, Object result) {
}
}
package tech.starwin.mvp.ui.activity;
import android.content.Context;
import java.util.List;
import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.mvp.beans.MsgInboxBean;
import tech.starwin.mvp.presenter.UserPresenter;
import tech.starwin.mvp.ui.adapter.MessageAdapter;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.ui_utils.UIHelper;
/**
* Created by SiKang on 2018/11/20.
*/
public class MessageListActivity extends BaseActivity {
public static void start(Context context) {
new ActivityJumper.Builder(context, MessageListActivity.class).build().start();
}
@Override
public int bindLayout() {
return R.layout.simple_recyclerview;
}
@Override
public void initView() {
setTopBarTitle(getString(R.string.text_title_system_message));
getPresenter(UserPresenter.class).getMsgList("action_getMsgList");
}
@Override
public void onHttpSuccess(String action, Object result) {
if (action.equals("action_getMsgList")) {
List<MsgInboxBean> msgInboxBeans = (List<MsgInboxBean>) result;
UIHelper.bindAdapter(findViewById(R.id.simple_recyclerview), new MessageAdapter(MessageListActivity.this, msgInboxBeans));
}
}
}
......@@ -4,16 +4,21 @@ import android.content.Intent;
import android.support.v4.app.FragmentActivity;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.mvp.ui.fragment.RegionFragment;
import tech.starwin.utils.context_utils.EasyActivityResult;
import tech.starwin.utils.context_utils.FragmentLauncher;
import tech.starwin.utils.event_bus.EventMessage;
/**
* Created by SiKang on 2018/9/27.
*/
public class RegionActivity extends BaseActivity {
public static final int CHANGE_REGION_TITLE = -1001;
@Override
public int bindLayout() {
......@@ -21,18 +26,14 @@ public class RegionActivity extends BaseActivity {
}
@Override
public boolean useTopBar() {
return false;
}
@Override
public FragmentLauncher getFragmentLauncher() {
return new FragmentLauncher(this, R.id.activity_area_frgmentLayout);
}
@Override
public void initView() {
startFragment(new RegionFragment(),false);
EventBus.getDefault().register(this);
startFragment(new RegionFragment(), false);
}
public static void startForResult(FragmentActivity activity, int requestCode, EasyActivityResult.OnResultListener listener) {
......@@ -41,13 +42,22 @@ public class RegionActivity extends BaseActivity {
}
@Override
public void onHttpSuccess(String action, Object result) {
@Subscribe
public void onEvent(EventMessage msg) {
if (msg.what == CHANGE_REGION_TITLE) {
setTopBarTitle(msg.msg);
}
}
@Override
protected void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
public void onHttpError(String action, String msg) {
public void onHttpSuccess(String action, Object result) {
}
}
......@@ -4,9 +4,16 @@ import android.content.Context;
import com.qmuiteam.qmui.widget.QMUITopBar;
import java.util.ArrayList;
import java.util.List;
import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.mvp.beans.RepaymentGuideBean;
import tech.starwin.mvp.ui.adapter.RepaymentGuideAdapter;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.ui_utils.UIHelper;
import tech.starwin.widget.TopBar;
/**
* Created by SiKang on 2018/11/17.
......@@ -18,9 +25,9 @@ public class RepaymentGuideActivity extends BaseActivity {
}
@Override
protected void initTopBar(QMUITopBar topBar) {
protected void initTopBar(TopBar topBar) {
super.initTopBar(topBar);
topBar.setTitle(R.string.text_title_repaymentraiders);
topBar.toolBar().setTitle(R.string.text_title_repaymentraiders);
}
@Override
......@@ -30,7 +37,13 @@ public class RepaymentGuideActivity extends BaseActivity {
@Override
public void initView() {
String[] titles = getResources().getStringArray(R.array.text_repayment_raiders_instruction_title);
String[] details = getResources().getStringArray(R.array.text_repayment_raiders_instruction_detail);
List<RepaymentGuideBean> guideBeanList = new ArrayList<>(titles.length);
for (int i = 0; i < titles.length; i++) {
guideBeanList.add(new RepaymentGuideBean(titles[i], details[i]));
}
UIHelper.bindAdapter(findViewById(R.id.activity_repaymentGuide_tv), new RepaymentGuideAdapter(this, guideBeanList));
}
@Override
......
package tech.starwin.mvp.ui.activity;
import android.content.Context;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.utils.context_utils.ActivityJumper;
/**
* Created by SiKang on 2018/11/19.
*/
public class WebActivity extends BaseActivity {
public static void start(Context context, String title, String url) {
new ActivityJumper.Builder(context, WebActivity.class)
.put("title", title)
.put("url", url)
.build().start();
}
WebView webView;
@Override
public int bindLayout() {
return R.layout.activity_web;
}
@Override
public void initView() {
String url = getIntent().getStringExtra("url");
String title = getIntent().getStringExtra("title");
setTopBarTitle(title);
webView = findViewById(R.id.activity_web_wv);
WebSettings seting=webView.getSettings();
seting.setJavaScriptEnabled(true);//设置webview支持javascript脚本
webView.setWebChromeClient(new WebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
if (newProgress == 100) {
onHttpFinish("");
} else {
onHttpStart("", true);
}
}
});
webView.loadUrl(url);
}
@Override
public void onHttpSuccess(String action, Object result) {
}
}
package tech.starwin.mvp.ui.adapter;
import android.content.Context;
import com.bumptech.glide.Glide;
import java.util.List;
import tech.starwin.R;
import tech.starwin.base.BaseRecyclerAdapter;
import tech.starwin.base.RecyclerViewHolder;
import tech.starwin.mvp.beans.ActivityInfoBean;
/**
* Created by SiKang on 2018/11/20.
*/
public class ActivityCenterAdapter extends BaseRecyclerAdapter<ActivityInfoBean> {
public ActivityCenterAdapter(Context ctx, List<ActivityInfoBean> list) {
super(ctx, list);
}
@Override
public Object bindItemLayout() {
return R.layout.item_activity_center;
}
@Override
public void bindData(RecyclerViewHolder holder, int position, ActivityInfoBean item) {
Glide.with(getContext()).load(item.getUrl()).into(holder.getImageView(R.id.iv_image_activity_center));
// holder.getTextView(R.id.tv_content_activity_center).setText(getContext().getString(R.string.title_activity_center));
}
}
package tech.starwin.mvp.ui.adapter;
import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.List;
import tech.starwin.R;
import tech.starwin.base.BaseRecyclerAdapter;
import tech.starwin.base.RecyclerViewHolder;
import tech.starwin.impl.OnEventClickListener;
import tech.starwin.mvp.beans.LoanAppHelpCenterTipsBean;
/**
* Created by SiKang on 2018/11/1.
*/
public class HelpCenterAdapter extends BaseRecyclerAdapter<LoanAppHelpCenterTipsBean> {
public HelpCenterAdapter(Context ctx, List<LoanAppHelpCenterTipsBean> list) {
super(ctx, list);
}
@Override
public Object bindItemLayout() {
return R.layout.item_help_center;
}
@Override
public void bindData(RecyclerViewHolder holder, int position, LoanAppHelpCenterTipsBean item) {
TextView titleTv = holder.getTextView(R.id.item_helpCenter_title_tv);
TextView detailTv = holder.getTextView(R.id.item_helpCenter_detail_tv);
ImageView instructionImv = holder.getImageView(R.id.item_helpCenter_instruction_imv);
titleTv.setText(item.mTitle);
detailTv.setText(item.mDetail);
holder.getView(R.id.item_helpCenter_item_view).setOnClickListener(new OnEventClickListener() {
@Override
public void onEventClick(View v) {
if (instructionImv.isSelected()) {
instructionImv.setSelected(false);
detailTv.setVisibility(View.GONE);
} else {
instructionImv.setSelected(true);
detailTv.setVisibility(View.VISIBLE);
}
}
});
}
}
package tech.starwin.mvp.ui.adapter;
import android.content.Context;
import android.widget.TextView;
import java.util.List;
import tech.starwin.LibConfig;
import tech.starwin.R;
import tech.starwin.base.BaseRecyclerAdapter;
import tech.starwin.base.RecyclerViewHolder;
import tech.starwin.mvp.beans.MsgInboxBean;
import tech.starwin.utils.format_utils.StringFormat;
import tech.starwin.utils.ui_utils.UIHelper;
/**
* Created by SiKang on 2018/11/20.
*/
public class MessageAdapter extends BaseRecyclerAdapter<MsgInboxBean> {
public MessageAdapter(Context ctx, List<MsgInboxBean> list) {
super(ctx, list);
}
@Override
public Object bindItemLayout() {
return R.layout.item_message_list;
}
@Override
public void bindData(RecyclerViewHolder holder, int position, MsgInboxBean item) {
String time = StringFormat.convertTime(item.getCreateTime(), "yyyy-MM-dd HH:mm:ss");
holder.getTextView(R.id.item_messageList_title_tv).setText(time);
TextView detailTv = holder.getTextView(R.id.item_messageList_detail_tv);
if (item.isRead()) {
String text_readed = getContext().getString(R.string.text_readed);
UIHelper.setTextHighLight(detailTv, item.getMsgBody() + " " + text_readed, R.color.qmui_config_color_gray_6, text_readed);
} else {
String text_new = getContext().getString(R.string.text_new);
UIHelper.setTextHighLight(detailTv, item.getMsgBody() + " " + text_new, LibConfig.MAIN_COLOR, text_new);
}
}
}
package tech.starwin.mvp.ui.adapter;
import android.content.Context;
import java.util.List;
import tech.starwin.R;
import tech.starwin.base.BaseRecyclerAdapter;
import tech.starwin.base.RecyclerViewHolder;
import tech.starwin.mvp.beans.RepaymentGuideBean;
/**
* Created by SiKang on 2018/11/17.
*/
public class RepaymentGuideAdapter extends BaseRecyclerAdapter<RepaymentGuideBean> {
public RepaymentGuideAdapter(Context ctx, List list) {
super(ctx, list);
}
@Override
public Object bindItemLayout() {
return R.layout.item_repayment_guide;
}
@Override
public void bindData(RecyclerViewHolder holder, int position, RepaymentGuideBean item) {
holder.getTextView(R.id.item_repaymentGuide_title_tv).setText(item.getGuideTitle());
holder.getTextView(R.id.item_repaymentGuide_detail_tv).setText(item.getGuideDetail());
}
}
package tech.starwin.mvp.ui.fragment;
import android.os.Bundle;
import android.view.ViewGroup;
import tech.starwin.base.BaseFragment;
import tech.starwin.mvp.beans.LatestLoanAppBean;
import tech.starwin.utils.context_utils.ActivityJumper;
/**
* Created by SiKang on 2018/10/16.
*/
public abstract class LoanInfoFragment extends BaseFragment {
private LatestLoanAppBean loanAppInfo;
@Override
public final void initView(ViewGroup contentView) {
if (getArguments() != null && getArguments().getParcelable("loanapp_info") != null) {
loanAppInfo = (LatestLoanAppBean) getArguments().getParcelable("loanapp_info");
}
initLoanView(contentView, loanAppInfo);
}
protected abstract void initLoanView(ViewGroup contentView, LatestLoanAppBean loanAppInfo);
public static Bundle createArguments(LatestLoanAppBean loanAppInfo) {
return new ActivityJumper.Builder().put("loanapp_info", loanAppInfo).toBundle();
}
}
......@@ -15,8 +15,10 @@ import tech.starwin.base.BaseFragment;
import tech.starwin.base.BaseRecyclerAdapter;
import tech.starwin.mvp.beans.RegionBean;
import tech.starwin.mvp.presenter.UserPresenter;
import tech.starwin.mvp.ui.activity.RegionActivity;
import tech.starwin.mvp.ui.adapter.RegionAdapter;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.event_bus.EventSender;
import tech.starwin.utils.ui_utils.UIHelper;
/**
......@@ -51,7 +53,6 @@ public class RegionFragment extends BaseFragment {
}
}
private QMUITopBar topBar;
private RecyclerView mRegionRv;
private RegionInfo regionInfo;
......@@ -62,14 +63,9 @@ public class RegionFragment extends BaseFragment {
@Override
public boolean useTopBar() {
return true;
return false;
}
@Override
protected void initTopBar(QMUITopBar topBar) {
super.initTopBar(topBar);
this.topBar = topBar;
}
@Override
public void initView(ViewGroup contentView) {
......@@ -88,21 +84,25 @@ public class RegionFragment extends BaseFragment {
} else {
regionInfo = new RegionInfo();
}
//设置标题
int titleId = 0;
switch (regionBean.getLevel()) {
case RegionLevel.PROVINCE:
topBar.setTitle(R.string.text_personal_info_province_of_residence);
titleId = R.string.text_personal_info_province_of_residence;
break;
case RegionLevel.CITY:
topBar.setTitle(R.string.text_personal_info_city_of_residence);
titleId = R.string.text_personal_info_city_of_residence;
break;
case RegionLevel.DISTRICT:
topBar.setTitle(R.string.text_personal_info_street_of_residence);
titleId = R.string.text_personal_info_street_of_residence;
break;
case RegionLevel.AREA:
topBar.setTitle(R.string.text_personal_info_area_of_residence);
titleId = R.string.text_personal_info_area_of_residence;
break;
}
new EventSender.Builder(RegionActivity.CHANGE_REGION_TITLE).msg(getString(titleId)).build().sendEvent();
//获取地区列表
getPresenter(UserPresenter.class).getRegion("action_getRegion", regionBean.getLevel(), regionBean.getId());
}
......@@ -121,7 +121,7 @@ public class RegionFragment extends BaseFragment {
if (action == "action_getRegion") {
//填充数据,更新UI
final RegionBean regionBean = (RegionBean) result;
if(regionBean.getRegions().size()==0){
if (regionBean.getRegions().size() == 0) {
getActivity().setResult(Activity.RESULT_OK, new ActivityJumper.Builder().put("region_info", regionInfo).toIntent());
getActivity().finish();
}
......
package tech.starwin.mvp.ui.fragment;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import com.qmuiteam.qmui.util.QMUIStatusBarHelper;
import tech.starwin.R;
import tech.starwin.base.BaseFragment;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.widget.TopBar;
/**
* Created by SiKang on 2018/11/20.
*/
public class RepaymentH5Fragment extends BaseFragment {
@Override
public boolean useTopBar() {
return true;
}
@Override
protected void initTopBar(TopBar topBar) {
topBar.setStatusBarHeight(QMUIStatusBarHelper.getStatusbarHeight(getActivity()));
topBar.toolBar().setBackgroundColor(getResources().getColor(R.color.translateColor));
topBar.toolBar().addLeftBackImageButton().setVisibility(View.INVISIBLE);
topBar.toolBar().setTitle(R.string.repayment_text);
}
WebView webView;
public static Bundle createArguments(String repayUrl) {
return new ActivityJumper.Builder()
.put("url", repayUrl)
.toBundle();
}
@Override
public int bindLayout() {
return R.layout.activity_web;
}
@Override
public void initView(ViewGroup contentView) {
String url = getArguments().getString("url");
webView = (WebView) findViewById(R.id.activity_web_wv);
WebSettings seting = webView.getSettings();
seting.setJavaScriptEnabled(true);//设置webview支持javascript脚本
webView.setWebChromeClient(new WebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
if (newProgress == 100) {
onHttpFinish("");
} else {
onHttpStart("", true);
}
}
});
webView.loadUrl(url);
}
@Override
public void onHttpSuccess(String action, Object result) {
}
}
package tech.starwin.network;
import android.text.TextUtils;
import java.io.IOException;
import okhttp3.Headers;
......@@ -46,6 +48,10 @@ class DefaultHeaderAddInterceptor implements Interceptor {
requestBuilder.header("Connection", "Keep-Alive");
}
if (TextUtils.isEmpty(LibConfig.XH_CHANNEL_NAME)) {
requestBuilder.header("X-APP-SOURCE", LibConfig.XH_CHANNEL_NAME);
}
boolean transparentGzip = false;
if (userRequest.header("Accept-Encoding") == null && userRequest.header("Range") == null) {
transparentGzip = true;
......
......@@ -7,7 +7,9 @@ import java.util.List;
import tech.starwin.LibConfig;
import tech.starwin.mvp.beans.GatewayInfoBean;
import tech.starwin.mvp.ui.activity.AgreementPolicyActivity;
import tech.starwin.utils.LogUtils;
import tech.starwin.utils.LoginManager;
import tech.starwin.utils.PreferencesManager;
/**
......@@ -41,7 +43,7 @@ public class Gateway {
return gatewayInfo.gateway;
}
public static String getPrivacyUrl() {
public static String getAgreementPolicyUrl() {
return gatewayInfo.privacy.get(0);
}
......@@ -53,6 +55,31 @@ public class Gateway {
return gatewayInfo.admin.get(0);
}
/**
* 贷款担保协议
*/
public static String getLoanAgreement(String loanId) {
return getAdminUrl() + LibConfig.LOAN_AGREEMENT + "?loanId=" + loanId;
}
/**
* 隐私政策
*/
public static String getPrivacyPolicy() {
return getAdminUrl() + LibConfig.PRIVACY_POLICY;
}
/**
* 还款页面
*/
public static String getRepayUrl() {
if (gatewayInfo.repay == null || gatewayInfo.repay.size() == 0) {
return "";
}
return gatewayInfo.repay.get(0) + "token=" + LoginManager.get().getToken();
}
public static String getRestUrl() {
return gatewayInfo.rest.get(0);
}
......
......@@ -12,6 +12,7 @@ import com.google.firebase.messaging.RemoteMessage;
import org.greenrobot.eventbus.EventBus;
import tech.starwin.LibConfig;
import tech.starwin.R;
......@@ -32,7 +33,7 @@ public class MsgHandleService extends FirebaseMessagingService {
Notification notification = new NotificationCompat.Builder(this, "default")
.setContentTitle(notificationInfo.getTitle())
.setContentText(notificationInfo.getBody())
.setSmallIcon(R.mipmap.ic_launcher)
.setSmallIcon(LibConfig.APP_ICON)
.setWhen(System.currentTimeMillis())
.setTicker(notificationInfo.getTitle())
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
......
......@@ -6,7 +6,9 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.util.Base64;
import com.facebook.accountkit.AccountKit;
import com.facebook.accountkit.AccountKitError;
import com.facebook.accountkit.AccountKitLoginResult;
import com.facebook.accountkit.ui.AccountKitActivity;
......@@ -24,6 +26,7 @@ import tech.starwin.mvp.beans.UserBean;
import tech.starwin.utils.context_utils.EasyActivityResult;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.event_bus.EventSender;
import tech.starwin.utils.format_utils.StringFormat;
/**
* Created by SiKang on 2018/9/19.
......@@ -75,11 +78,25 @@ public class LoginManager {
* facebook 短信登录
*/
public void startFacebookSmsLogin(FragmentActivity activity, final OnFacebookLoginResult result) {
if (AccountKit.getCurrentAccessToken() != null) {
AccountKit.logOut();
}
String[] countryCodes;
if (LibConfig.DEBUG) {
countryCodes = new String[]{"CN", "ID"};
} else {
countryCodes = new String[]{"ID"};
}
final Intent intent = new Intent(activity, AccountKitActivity.class);
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE,
AccountKitActivity.ResponseType.CODE); // or .ResponseType.TOKEN
AccountKitActivity.ResponseType.CODE)
.setInitialAuthState(generateRandomString())
.setFacebookNotificationsEnabled(true)
.setSMSWhitelist(countryCodes)
.setDefaultCountryCode("ID"); // or .ResponseType.TOKEN
intent.putExtra(AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION, configurationBuilder.build());
new EasyActivityResult(activity).startForResult(intent, 0, new EasyActivityResult.OnResultListener() {
@Override
......@@ -97,6 +114,13 @@ public class LoginManager {
}
}
});
}
private String generateRandomString() {
double randomNum = Math.random();
long currentTime = System.currentTimeMillis();
return StringFormat.base64((LibConfig.APPLICATION_ID + randomNum + currentTime).getBytes(), Base64.DEFAULT);
}
......@@ -154,6 +178,7 @@ public class LoginManager {
tokenInfo = null;
userInfo = null;
PreferencesManager.get().clearLoginInfo();
AccountKit.logOut();
}
......
......@@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Base64;
import java.util.Map;
......@@ -11,7 +12,7 @@ import tech.starwin.mvp.beans.GatewayInfoBean;
import tech.starwin.mvp.beans.OcrResultBean;
import tech.starwin.mvp.beans.TokenInfoBean;
import tech.starwin.mvp.beans.UserBean;
import tech.starwin.utils.format_utils.DataFormat;
import tech.starwin.utils.format_utils.StringFormat;
/**
* Created by SiKang on 2018/9/18.
......@@ -52,12 +53,12 @@ public class PreferencesManager {
* 存取登录信息
*/
public void saveTokenInfo(TokenInfoBean tokenInfoBean) {
saveData("token_info", DataFormat.fromBean(tokenInfoBean));
saveData("token_info", StringFormat.fromBean(tokenInfoBean));
}
public TokenInfoBean getTokenInfo() {
String objStr = getString("token_info", "");
return TextUtils.isEmpty(objStr) ? null : (TokenInfoBean) DataFormat.toBean(objStr);
return TextUtils.isEmpty(objStr) ? null : (TokenInfoBean) StringFormat.toBean(objStr);
}
......@@ -65,12 +66,12 @@ public class PreferencesManager {
* 存取用户信息
*/
public void saveUserInfo(UserBean userInfo) {
saveData("user_info", DataFormat.fromBean(userInfo));
saveData("user_info", StringFormat.fromBean(userInfo));
}
public UserBean getUserInfo() {
String objStr = getString("user_info", "");
return TextUtils.isEmpty(objStr) ? null : (UserBean) DataFormat.toBean(objStr);
return TextUtils.isEmpty(objStr) ? null : (UserBean) StringFormat.toBean(objStr);
}
......@@ -78,12 +79,12 @@ public class PreferencesManager {
* 存取KTP信息
*/
public void saveKTPInfo(OcrResultBean.KTP ktpInfo) {
saveData("ktp_info", DataFormat.fromBean(ktpInfo));
saveData("ktp_info", StringFormat.fromBean(ktpInfo));
}
public OcrResultBean.KTP getKTPInfo() {
String objStr = getString("ktp_info", "");
return TextUtils.isEmpty(objStr) ? null : (OcrResultBean.KTP) DataFormat.toBean(objStr);
return TextUtils.isEmpty(objStr) ? null : (OcrResultBean.KTP) StringFormat.toBean(objStr);
}
......@@ -91,12 +92,12 @@ public class PreferencesManager {
* 存取Gateway信息
*/
public void saveGatewayInfo(GatewayInfoBean gatewayInfo) {
saveData("gateway_info", DataFormat.fromBean(gatewayInfo));
saveData("gateway_info", StringFormat.fromBean(gatewayInfo));
}
public GatewayInfoBean getGatewayInfo() {
String objStr = getString("gateway_info", "");
return TextUtils.isEmpty(objStr) ? null : (GatewayInfoBean) DataFormat.toBean(objStr);
return TextUtils.isEmpty(objStr) ? null : (GatewayInfoBean) StringFormat.toBean(objStr);
}
......@@ -129,7 +130,7 @@ public class PreferencesManager {
if (data == null) {
saveData("verification_data", "");
} else {
saveData("verification_data", DataFormat.base64(data));
saveData("verification_data", StringFormat.base64(data, Base64.NO_WRAP));
}
}
......@@ -139,13 +140,6 @@ public class PreferencesManager {
/**
* 更新政策 是否同意 状态
*/
public void setPolicyStatus(boolean isAgreed) {
saveData("has_agreed_policy", isAgreed);
}
/**
* 保存上传用户数据时使用的sessionId
*/
public void saveSessionId(String sessionId) {
......@@ -160,6 +154,24 @@ public class PreferencesManager {
}
/**
* 更新政策 是否同意 状态
*/
public void setPolicyStatus(boolean isAgreed) {
saveData("has_agreed_policy", isAgreed);
}
/**
* 贷款记过提示是否已经显示过
*/
public void setLoanRsultNotifyStatus(boolean isNotified) {
saveData("loan_result_notify", isNotified);
}
public boolean isLoanRsultNotified() {
return getBoolean("loan_result_notify", false);
}
/**
* 是否已同意政策
*/
public boolean hasAgreedPolicy() {
......
......@@ -246,7 +246,7 @@ public class UploadManager {
object.put("checkTime", System.currentTimeMillis());
object.put("permissionType", permissionsTocheck[i]);
if (PermissionsHelper.permissionGranted(permissionsTocheck[i], context)) {
if (PermissionsHelper.isGranted(context,permissionsTocheck[i])) {
object.put("isGranted", "GRANTED");
} else {
object.put("isGranted", "REFUSED");
......@@ -264,6 +264,7 @@ public class UploadManager {
return array;
}
/**
* 上传异常信息
* */
......
......@@ -3,20 +3,27 @@ package tech.starwin.utils.context_utils;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcelable;
import android.provider.Telephony;
import android.view.View;
import java.io.Serializable;
import java.util.List;
import tech.starwin.LibConfig;
import tech.starwin.R;
import tech.starwin.utils.ui_utils.DialogFactory;
import tech.starwin.utils.ui_utils.DialogManager;
/**
* Created by SiKang on 2018/9/16.
* Intent的创建和使用
*/
public class ActivityJumper {
private static String GP_APP_DETAIL_URL = "https://play.google.com/store/apps/details?id=" + LibConfig.APPLICATION_ID;
private Intent intent;
/**
* 发起跳转的Context
......@@ -83,6 +90,31 @@ public class ActivityJumper {
context.startActivity(intent);
}
/**
* 去 GooglePlay下载页
*/
public static void startGooglePlay(Context context) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(GP_APP_DETAIL_URL));
List<ResolveInfo> resolveInfos = context.getPackageManager().queryIntentActivities(intent, 0);
if (resolveInfos == null || resolveInfos.size() <= 0) {
DialogFactory.showMessageDialog(context, context.getString(R.string.show_download_on_google_player));
} else {
for (ResolveInfo resolveInfo : resolveInfos) {
if (resolveInfo.activityInfo.packageName.toLowerCase().contains("com.android.vending")
|| resolveInfo.activityInfo.name.toLowerCase().contains("com.android.vending")
|| resolveInfo.activityInfo.processName.toLowerCase().contains("com.android.vending")) {
intent.setPackage(resolveInfo.activityInfo.packageName);
break;
}
}
}
context.startActivity(intent);
} catch (Exception e) {
DialogFactory.showMessageDialog(context, context.getString(R.string.show_download_on_google_player));
}
}
public static class Builder {
private Intent intent;
private Context fromContext;
......
......@@ -83,6 +83,7 @@ public class FragmentLauncher {
if (framentSet.containsKey(className)) {
fragment = (T) framentSet.get(className);
if (fragment == currentFragment) {
fragment.setArguments(arguments);
return fragment;
}
}
......@@ -92,7 +93,7 @@ public class FragmentLauncher {
if (currentFragment != null) {
if (isDestory) {
transaction.remove(currentFragment);
framentSet.remove(currentFragment);
framentSet.remove(currentFragment.getClass().getName());
} else {
transaction.hide(currentFragment);
}
......
......@@ -24,14 +24,22 @@ import android.text.TextUtils;
import com.tbruyelle.rxpermissions2.Permission;
import com.tbruyelle.rxpermissions2.RxPermissions;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import tech.starwin.BuildConfig;
import tech.starwin.LibConfig;
import tech.starwin.utils.LogUtils;
import tech.starwin.utils.PreferencesManager;
import tech.starwin.utils.ui_utils.DialogFactory;
......@@ -100,8 +108,6 @@ public class PermissionsHelper {
refused.toArray(new Permission[refused.size()]),
neverAsk.toArray(new Permission[neverAsk.size()]));
}
}
});
}
......@@ -284,14 +290,31 @@ public class PermissionsHelper {
/**
* 是否同意了某个权限
*/
public static boolean permissionGranted(String permission, Context ctx) {
public static boolean isGranted(Context ctx, String permission) {
if (permission == null) {
return true;
return false;
}
return Build.VERSION.SDK_INT < 23 || PermissionChecker.checkSelfPermission(ctx, permission) == PackageManager.PERMISSION_GRANTED;
}
/**
* 权限是否全部获取
*/
public static boolean isGranted(Context ctx, String[] permissions) {
if (permissions == null || permissions.length == 0) {
return false;
}
for (String permission : permissions) {
boolean isGranted = Build.VERSION.SDK_INT < 23 || PermissionChecker.checkSelfPermission(ctx, permission) == PackageManager.PERMISSION_GRANTED;
if (!isGranted) {
return false;
}
}
return true;
}
// public interface OnDefaultAppResult {
// void onAllow();
//
......
......@@ -3,7 +3,6 @@ package tech.starwin.utils.format_utils;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.text.TextUtils;
import android.util.Base64;
......@@ -25,17 +24,16 @@ import tech.starwin.R;
* Created by SiKang on 2018/10/16.
* 时间、货币、String、Bean 格式化工具
*/
public class DataFormat {
public class StringFormat {
/**
* 格式化金额
*/
public static String indMoneyFormat(@Nullable Context context, double money) {
public static String moneyFormat(@Nullable Context context, double money) {
return String.format(context.getString(R.string.moneySymbol) + "%,.0f", money).replaceAll(",", ".");
}
public static String moneyFormat(double paidAmount) {
// return moneyFormat(String.valueOf(paidAmount));
public static String moneyConversion(double paidAmount) {
return String.format("%,.0f", paidAmount).replace(",", ".");
}
......@@ -43,12 +41,12 @@ public class DataFormat {
* 格式化时间
*/
@Nullable
public static String periodFormate(@Nullable Context context, double term, @NonNull String periodUnit) {
String result = "" + (int) term + getPeriodTextUnit(context, periodUnit);
public static String periodFormat(@Nullable Context context, double term, @NonNull String periodUnit) {
String result = "" + (int) term + periodUnitFormat(context, periodUnit);
return result;
}
private static String getPeriodTextUnit(Context context, String periodUnit) {
public static String periodUnitFormat(Context context, String periodUnit) {
String unit = context.getResources().getString(R.string.days);
if ("D".equals(periodUnit)) {
unit = context.getString(R.string.days);
......@@ -92,7 +90,7 @@ public class DataFormat {
ObjectOutputStream objectOutputStream = null;
objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
objectOutputStream.writeObject(obj);
return base64(byteArrayOutputStream.toByteArray());
return base64(byteArrayOutputStream.toByteArray(),Base64.DEFAULT);
} catch (IOException e) {
e.printStackTrace();
}
......@@ -129,9 +127,9 @@ public class DataFormat {
/**
* String转base64
*/
public static String base64(byte[] bytes) {
public static String base64(byte[] bytes,int flag) {
if (bytes != null && bytes.length > 0)
return Base64.encodeToString(bytes, Base64.DEFAULT);
return Base64.encodeToString(bytes, flag);
else
return "";
}
......
......@@ -79,7 +79,7 @@ public class DialogFactory {
/**
* 创建一个带有文本提示和两个含义相对按钮的对话框
*/
public static Dialog createYesOrNoDialog(Context context,String msg, final OnYesOrNoListener onYesOrNoListener) {
public static Dialog createYesOrNoDialog(Context context, String msg, final OnYesOrNoListener onYesOrNoListener) {
return createYesOrNoDialog(context, "Tip", msg, context.getString(R.string.text_sure), context.getString(R.string.text_cancel), onYesOrNoListener);
}
......@@ -243,8 +243,8 @@ public class DialogFactory {
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
public void show() {
super.show();
setContentView(view);
}
}
......
package tech.starwin.utils.ui_utils;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.support.annotation.DrawableRes;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.tbruyelle.rxpermissions2.Permission;
import tech.starwin.R;
import tech.starwin.base.RecyclerViewHolder;
import tech.starwin.mvp.beans.LatestLoanAppBean;
import tech.starwin.mvp.beans.UpdateBean;
import tech.starwin.utils.PreferencesManager;
import tech.starwin.utils.context_utils.PermissionsHelper;
/**
* Created by SiKang on 2018/11/20.
* 业务相关的Dialog管理
*/
public class DialogManager {
/**
* 显示贷款成功Dialog
*/
public static void showLoanSuccessDialog(Context context, @DrawableRes int imageId) {
PreferencesManager.get().setLoanRsultNotifyStatus(true);
DialogFactory.createCustomDialog(context, R.layout.dialog_loan_success, (dialog, viewHolder) -> {
viewHolder.getImageView(R.id.iv_closed_header).setImageResource(imageId);
viewHolder.getButton(R.id.btn_dialog_current_oko).setOnClickListener(v -> dialog.dismiss());
}).show();
}
/**
* 显示贷款关闭Dialog
*/
public static void showLoanClosedDialog(Context context, @DrawableRes int imageId, LatestLoanAppBean latestLoanAppBean) {
PreferencesManager.get().setLoanRsultNotifyStatus(true);
DialogFactory.createCustomDialog(context, R.layout.dialog_loan_closed, (dialog, viewHolder) -> {
viewHolder.getImageView(R.id.iv_closed_header).setImageResource(imageId);
if (latestLoanAppBean != null && latestLoanAppBean.getComments() != null) {
String[] closedReasons = latestLoanAppBean.getComments().split(",");
StringBuilder closedReasonsStr = new StringBuilder();
for (int j = 1; j <= closedReasons.length; j++) {
closedReasonsStr.append(j).append(". ").append(closedReasons[j - 1]).append
("\n");
}
viewHolder.getTextView(R.id.id_textview_closed_dialog_content).setText(closedReasonsStr.toString());
}
viewHolder.getButton(R.id.id_button_goto_modify).setOnClickListener(v -> dialog.dismiss());
}).show();
}
/**
* 显示贷款失败Dialog
*/
public static void showLoanFailedDialog(Context context, @DrawableRes int imageId) {
PreferencesManager.get().setLoanRsultNotifyStatus(true);
DialogFactory.createCustomDialog(context, R.layout.dialog_loan_failed, (dialog, viewHolder) -> {
viewHolder.getImageView(R.id.iv_closed_header).setImageResource(imageId);
viewHolder.getButton(R.id.btn_result_failed).setOnClickListener(v -> dialog.dismiss());
}).show();
}
/**
* 更新弹窗
*/
public static void showUpdateDialog(Context context, @DrawableRes int imgId, UpdateBean updateBean, View.OnClickListener listener) {
if (updateBean != null && updateBean.getReleaseNotes() != null && updateBean.getReleaseNotes().size() > 0) {
Dialog dialog = DialogFactory.createCustomDialog(context, R.layout.dialog_update, (dialog1, viewHolder) -> {
viewHolder.getImageView(R.id.tv_dialog_update_title).setImageResource(imgId);
viewHolder.getButton(R.id.btn_dialog_update_download).setOnClickListener(listener);
viewHolder.getTextView((R.id.tv_update_notes)).setText(updateBean.getReleaseNotesStr());
});
dialog.setCanceledOnTouchOutside(false);
dialog.setCancelable(false);
dialog.show();
}
}
}
......@@ -14,6 +14,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.qmuiteam.qmui.util.QMUIStatusBarHelper;
import com.qmuiteam.qmui.widget.QMUIEmptyView;
......@@ -25,6 +26,7 @@ import com.qmuiteam.qmui.widget.grouplist.QMUIGroupListView;
import tech.starwin.R;
import tech.starwin.utils.BitmapUtils;
import tech.starwin.widget.PageStateLayout;
import tech.starwin.widget.TopBar;
/**
* Created by SiKang on 2018/10/12.
......@@ -56,6 +58,7 @@ public class QMUIHelper {
public static PageStateLayout bindEmptyView(View targetView, final String emptyText, final String retryText, PageStateLayout.OnRetryListener listener) {
//创建一个默认的EmptyView
final QMUIEmptyView emptyView = new QMUIEmptyView(targetView.getContext());
emptyView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
emptyView.setBackgroundColor(Color.WHITE);
//给targetView 套壳
final PageStateLayout pageStateLayout = new PageStateLayout.Builder(targetView)
......@@ -152,20 +155,14 @@ public class QMUIHelper {
/**
* 向一个ViewGroup 插入一个TopBar
*/
public static QMUITopBar insertTopBar(ViewGroup viewGroup, boolean isTransParentStatusBar) {
ViewGroup titleGroup = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.base_topbar, viewGroup, true).findViewById(R.id.layout_title);
QMUITopBar topBar = titleGroup.findViewById(R.id.layout_topbar);
//如果开启沉浸式状态栏,则获取状态栏高度,并将Top扩大相应的高度
public static TopBar insertTopBar(ViewGroup viewGroup, boolean isTransParentStatusBar) {
TopBar topBar = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.base_topbar, viewGroup, true).findViewById(R.id.topbar);
//如果开启沉浸式状态栏,则获取状态栏高度,并将TopBar增加相应的高度
if (isTransParentStatusBar) {
View statusBar = titleGroup.findViewById(R.id.layout_statusbar);
statusBar.setVisibility(View.VISIBLE);
ViewGroup.LayoutParams layoutParams = statusBar.getLayoutParams();
layoutParams.height = QMUIStatusBarHelper.getStatusbarHeight(viewGroup.getContext());
statusBar.setLayoutParams(layoutParams);
topBar.setStatusBarHeight(QMUIStatusBarHelper.getStatusbarHeight(viewGroup.getContext()));
}
if (topbarCustomizer != null) {
topbarCustomizer.madeTopBar(titleGroup, topBar);
topbarCustomizer.madeTopBar(topBar);
}
return topBar;
}
......@@ -179,11 +176,8 @@ public class QMUIHelper {
* TopBar默认样式定制
*/
public interface TopbarCustomizer {
/**
* @param titleGroup 包含 TopBar 的Title模块,在使用沉浸式状态栏时,会在TopBar上方填充对应的高度
* @param topBar
*/
void madeTopBar(ViewGroup titleGroup, QMUITopBar topBar);
// void madeTopBar(ViewGroup titleGroup, QMUITopBar topBar);
void madeTopBar(TopBar topBar);
}
}
......@@ -16,6 +16,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.SpannableString;
......@@ -42,6 +43,7 @@ import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.schedulers.Schedulers;
import tech.starwin.R;
import tech.starwin.base.RecyclerViewHolder;
import tech.starwin.utils.BitmapUtils;
import tech.starwin.widget.PageStateLayout;
......@@ -67,16 +69,18 @@ public class UIHelper {
/**
* 为View添加ClickListener
*/
public static <T extends View.OnClickListener> void bindClickListener(ViewGroup viewGroup, T listener, @IdRes int... idSet) {
public static <T extends View.OnClickListener> RecyclerViewHolder bindClickListener(ViewGroup viewGroup, T listener, @IdRes int... idSet) {
if (idSet.length == 0 && listener == null) {
return;
return null;
}
RecyclerViewHolder holder = new RecyclerViewHolder(viewGroup);
for (int id : idSet) {
View view = viewGroup.findViewById(id);
View view = holder.getView(id);
if (view != null) {
view.setOnClickListener(listener);
}
}
return holder;
}
......@@ -89,6 +93,12 @@ public class UIHelper {
recyclerView.setItemAnimator(new DefaultItemAnimator());
}
public static void bindAdapter(RecyclerView recyclerView, RecyclerView.Adapter adapter, int spanCount) {
recyclerView.setLayoutManager(new GridLayoutManager(recyclerView.getContext(), spanCount));
recyclerView.setAdapter(adapter);
recyclerView.setItemAnimator(new DefaultItemAnimator());
}
public static boolean hasEmptyValue(View... views) {
for (View view : views) {
......@@ -181,7 +191,7 @@ public class UIHelper {
* @param text 要高亮显示的文字(输入的关键词)
* @param highTexts 高亮文字
*/
public static void setTextHighLight(TextView textView, String text, int colorId, String... highTexts) {
public static void setTextHighLight(TextView textView, String text, @ColorRes int colorId, String... highTexts) {
SpannableStringBuilder builder = new SpannableStringBuilder(text);
// 遍历要显示的文字
for (String highText : highTexts) {
......
......@@ -12,6 +12,7 @@ import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.HashMap;
......@@ -23,7 +24,7 @@ import java.util.Map;
* 页面状态展示 loading、错误、无数据、重新请求 等
* 通过 setStateView() 指定一个View,在view和父布局之间,嵌套一层FrameLayout,并加入自定义的展示界面
*/
public class PageStateLayout extends FrameLayout {
public class PageStateLayout extends RelativeLayout {
private View mStateView;
private OnStateChangedListener onStateChangedListener;
private OnRetryListener onRetryListener;
......
package tech.starwin.widget;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.widget.DrawerLayout;
import android.util.AttributeSet;
import android.view.MotionEvent;
/**
* Created by SiKang on 2018/11/15.
* 首页UI的布局设计中,页面内容的尺寸是大于DrawerLayout的,所以无法将Content放在DrawerLayout中,只能将Drawer覆盖在Content上,而这样又会导致Touch事件冲突,Content无法收到Touch事件
* 所以这里使用了PenetrateDrawerLayout来放行Touch事件,在Drawer处理完 Touch 事件后主动放行,让Content能够继续处理事件
*/
public class PenetrateDrawerLayout extends DrawerLayout {
public PenetrateDrawerLayout(@NonNull Context context) {
super(context);
}
public PenetrateDrawerLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public PenetrateDrawerLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
// switch (ev.getAction()) {
// case MotionEvent.ACTION_DOWN:
// LogUtils.d("TouchTest", "Drawer: ACTION_DOWN");
// break;
// case MotionEvent.ACTION_MOVE:
// LogUtils.d("TouchTest", "Drawer: ACTION_MOVE");
// break;
// case MotionEvent.ACTION_CANCEL:
// LogUtils.d("TouchTest", "Drawer: ACTION_CANCEL");
// break;
// case MotionEvent.ACTION_UP:
// LogUtils.d("TouchTest", "Drawer: ACTION_UP");
// break;
// }
return super.dispatchTouchEvent(ev);
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
super.onTouchEvent(ev);
return false;
}
}
package tech.starwin.widget;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.FrameLayout;
/**
* Created by SiKang on 2018/11/15.
* 首页UI的布局设计中,页面内容的尺寸是大于DrawerLayout的,所以无法将Content放在DrawerLayout中,只能将Drawer覆盖在Content上,而这样又会导致Touch事件冲突,Content无法收到Touch事件
* 所以使用了PenetrateDrawerLayout来放行Touch事件,放行后导致新的问题,即 DOWN 事件被Content消费后,PenetrateDrawerLayout无法收到后续的 MOVE 事件,Drawer就无法实现手动滑出
* 这里的 PenetrateFrameLayout 通过 setPartnerGroup() 方法绑定 PenetrateDrawerLayout ,将 MOVE 事件重新交给 PenetrateDrawerLayout 处理
*/
public class PenetrateFrameLayout extends FrameLayout {
ViewGroup partnerGroup;
public PenetrateFrameLayout(@NonNull Context context) {
super(context);
}
public PenetrateFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public PenetrateFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public void setPartnerGroup(ViewGroup partnerGroup) {
this.partnerGroup = partnerGroup;
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
// switch (ev.getAction()) {
// case MotionEvent.ACTION_DOWN:
// LogUtils.d("TouchTest", "Frame: ACTION_DOWN" + isClickable());
// break;
// case MotionEvent.ACTION_MOVE:
// LogUtils.d("TouchTest", "Frame: ACTION_MOVE" + isClickable());
// break;
// case MotionEvent.ACTION_CANCEL:
// LogUtils.d("TouchTest", "Frame: ACTION_CANCEL" + isClickable());
// break;
// case MotionEvent.ACTION_UP:
// LogUtils.d("TouchTest", "Frame: ACTION_UP" + isClickable());
// break;
// }
if (partnerGroup != null ) {
partnerGroup.dispatchTouchEvent(ev);
}
return isClickable() ? super.dispatchTouchEvent(ev) : true;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
super.onTouchEvent(ev);
return false;
}
@Override
protected void onDetachedFromWindow() {
partnerGroup = null;
super.onDetachedFromWindow();
}
}
......@@ -37,6 +37,11 @@ public class ProgressDialog {
}
public boolean isShowing() {
return loadingDialog.isShowing();
}
public void showLoading() {
if (!loadingDialog.isShowing() && enable) {
loadingDialog.show();
......
package tech.starwin.widget;
import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.qmuiteam.qmui.widget.QMUITopBar;
/**
* Created by SiKang on 2018/11/18.
*/
public class TopBar extends LinearLayout {
private View statusBar;
private QMUITopBar toolBar;
private int statusBarHeight = 0;
LayoutParams statusBarLayout;
LayoutParams toolBarLayout;
public TopBar(Context context) {
super(context);
init(context);
}
public TopBar(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init(context);
}
public TopBar(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private void init(Context context) {
setOrientation(VERTICAL);
statusBar = new View(context);
statusBarLayout = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
statusBar.setLayoutParams(statusBarLayout);
toolBar = new QMUITopBar(context);
toolBarLayout = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
toolBar.setLayoutParams(toolBarLayout);
addView(statusBar);
addView(toolBar);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
int heightSize = MeasureSpec.getSize(heightMeasureSpec);
heightMeasureSpec = MeasureSpec.makeMeasureSpec(heightSize + statusBarHeight, heightMode);
statusBarLayout.height = statusBarHeight;
toolBarLayout.height = heightSize;
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
public QMUITopBar toolBar() {
return toolBar;
}
public void setStatusBarHeight(int statusBarHeight) {
this.statusBarHeight = statusBarHeight;
invalidate();
}
}
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/arc_right" android:state_selected="false" />
<item android:drawable="@drawable/arc_down_light" android:state_selected="true" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/cb_enabled_checked" android:state_checked="true" />
<item android:drawable="@drawable/cb_disabled" android:state_selected="true" />
<item android:drawable="@drawable/cb_disabled" android:state_enabled="false" />
<item android:drawable="@drawable/cb_enabled_unchecked" android:state_enabled="true" />
<item android:drawable="@drawable/cb_enabled_unchecked" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/activity_about_us_tv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:padding="14dp" />
</LinearLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_bg" />
<android.support.v7.widget.RecyclerView
android:id="@+id/activity_helpCenter_rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:divider="@color/gray_bg" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_bg"
android:orientation="vertical">
<WebView
android:id="@+id/activity_policy_webview"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="@dimen/x_40"
android:layout_weight="1"
android:background="@color/white" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="@string/read_policy_fully"
android:textSize="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="14dp"
android:orientation="horizontal">
<CheckBox
android:id="@+id/activity_policy_checkbox"
android:layout_width="@dimen/x_80"
android:layout_height="@dimen/x_80" />
<TextView
android:id="@+id/activity_policy_agreement_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/x_15"
android:tag="read_policy"
android:text="@string/i_agree_this_policy" />
</LinearLayout>
<Button
android:id="@+id/activity_policy_ok_btn"
style="@style/main_color_roundBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/x_50"
android:text="@string/button_ok" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<WebView
android:id="@+id/activity_repay_web_wv"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/activity_repaymentGuide_tv"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<WebView
android:id="@+id/activity_web_wv"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/main_color"
android:orientation="vertical">
<?xml version="1.0" encoding="utf-8"?><!--<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"--><!--android:id="@+id/layout_title"--><!--android:layout_width="match_parent"--><!--android:layout_height="wrap_content"--><!--android:orientation="vertical">-->
<!--<TextView--><!--android:id="@+id/layout_statusbar"--><!--android:layout_width="match_parent"--><!--android:layout_height="@dimen/x_40"--><!--android:visibility="gone" />-->
<TextView
android:id="@+id/layout_statusbar"
android:layout_width="match_parent"
android:layout_height="@dimen/x_40"
android:visibility="gone" />
<!--<com.qmuiteam.qmui.widget.QMUITopBar--><!--android:id="@+id/layout_topbar"--><!--android:layout_width="match_parent"--><!--android:layout_height="@dimen/x_150" />-->
<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/layout_topbar"
android:layout_width="match_parent"
android:layout_height="@dimen/x_150" />
</LinearLayout>
\ No newline at end of file
<!----><!--</LinearLayout>-->
<tech.starwin.widget.TopBar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="@dimen/x_150" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.layout.QMUILinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_50"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/x_50"
app:qmui_radius="5dp"
app:qmui_shadowElevation="1dp">
<TextView
android:layout_width="@dimen/x_800"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/iv_closed_header"
android:layout_width="@dimen/x_300"
android:layout_height="@dimen/x_300"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_50"
android:orientation="vertical"
android:paddingLeft="@dimen/x_50"
android:paddingRight="@dimen/x_50">
<TextView
android:id="@+id/tv_loanresult_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/loan_result_title_rejected" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_30"
android:text="@string/dialog_closed_tips" />
<TextView
android:id="@+id/id_textview_closed_dialog_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_30"
android:visibility="visible" />
</LinearLayout>
<Button
android:id="@+id/id_button_goto_modify"
style="@style/main_color_roundBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/x_30"
android:text="@string/button_ok" />
</com.qmuiteam.qmui.layout.QMUILinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.layout.QMUILinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_50"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/x_50"
app:qmui_radius="5dp"
app:qmui_shadowElevation="1dp">
<TextView
android:layout_width="@dimen/x_800"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/iv_closed_header"
android:layout_width="@dimen/x_300"
android:layout_height="@dimen/x_300"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/x_30">
<TextView
android:id="@+id/tv_loanresult_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/loan_result_title_rejected"
android:visibility="gone" />
<TextView
android:id="@+id/tv_loanresult_tips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_30"
android:gravity="center_horizontal"
android:text="@string/loan_result_tip_rejected" />
</LinearLayout>
<Button
android:id="@+id/btn_result_failed"
style="@style/main_color_roundBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/x_30"
android:text="@string/text_sure" />
</com.qmuiteam.qmui.layout.QMUILinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.layout.QMUILinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_50"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/x_50"
app:qmui_radius="5dp"
app:qmui_shadowElevation="1dp">
<TextView
android:layout_width="@dimen/x_800"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/iv_closed_header"
android:layout_width="@dimen/x_300"
android:layout_height="@dimen/x_300"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/x_30"
android:layout_marginTop="@dimen/x_20"
android:orientation="vertical">
<TextView
android:id="@+id/tv_loanresult_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/loan_result_title_approved"
android:visibility="gone" />
<TextView
android:id="@+id/tv_loanresult_tips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_30"
android:gravity="center_horizontal"
android:text="@string/loan_result_tip_approved" />
</LinearLayout>
<Button
android:id="@+id/btn_dialog_current_oko"
style="@style/main_color_roundBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_30"
android:gravity="center"
android:text="@string/text_sure" />
</com.qmuiteam.qmui.layout.QMUILinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/x_50">
<TextView
android:layout_width="@dimen/x_800"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/tv_dialog_update_title"
android:layout_width="@dimen/x_300"
android:layout_height="@dimen/x_300" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_30">
<LinearLayout
android:id="@+id/ll_dialog_update_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/x_30">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/text_update_software"
android:textColor="@color/qmui_config_color_gray_1" />
<TextView
android:id="@+id/tv_dialog_update_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/x_30"
android:layout_marginTop="@dimen/x_30"
android:text="@string/text_update_tips" />
<TextView
android:id="@+id/tv_update_notes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="test" />
</LinearLayout>
</FrameLayout>
<Button
android:id="@+id/btn_dialog_update_download"
style="@style/main_color_roundBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_30"
android:gravity="center"
android:text="@string/dialog_button_download" />
</LinearLayout>
\ No newline at end of file
<?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:id="@+id/ll_activity_center_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/x_50"
android:layout_marginRight="@dimen/x_50"
app:cardCornerRadius="@dimen/x_20"
android:layout_marginTop="@dimen/x_40"
app:cardElevation="@dimen/x_10">
<ImageView
android:id="@+id/iv_image_activity_center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:tintMode="multiply" />
</android.support.v7.widget.CardView>
<!--<RelativeLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content">-->
<!--<TextView-->
<!--android:id="@+id/tv_content_activity_center"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="test"-->
<!--android:textColor="@color/qmui_config_color_gray_3" />-->
<!--<TextView-->
<!--android:id="@+id/tv_time_activity_center"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_alignParentRight="true"-->
<!--android:textColor="@color/qmui_config_color_gray_3"-->
<!--android:text="2017-06-08" />-->
<!--</RelativeLayout>-->
<!--<View-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/x_20" />-->
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:id="@+id/item_helpCenter_item_view"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingLeft="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/item_helpCenter_title_tv"
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_weight="1"
android:textColor="@color/qmui_config_color_gray_3"
android:gravity="center_vertical"
android:text="@string/loan_app_id" />
<ImageView
android:id="@+id/item_helpCenter_instruction_imv"
android:layout_width="20dp"
android:layout_height="12dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="14dp"
android:layout_marginRight="12dp"
android:scaleType="center"
android:src="@drawable/selector_arc" />
</LinearLayout>
<TextView
android:id="@+id/item_helpCenter_detail_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:textColor="@color/qmui_config_color_gray_6"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:text="text"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_bg" />
</LinearLayout>
\ No newline at end of file
<?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:layout_marginTop="@dimen/x_30"
android:background="@color/white"
android:orientation="vertical"
android:padding="@dimen/x_50">
<TextView
android:id="@+id/item_messageList_title_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="title" />
<TextView
android:id="@+id/item_messageList_detail_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/x_15"
android:text="content" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/x_50"
android:paddingRight="@dimen/x_50">
......@@ -19,6 +19,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/x_50"
android:textColor="@color/qmui_config_color_gray_8"
android:textSize="@dimen/x_30" />
android:textColor="@color/qmui_config_color_gray_6"
android:textSize="@dimen/x_35" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_bg"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/simple_recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal" />
</LinearLayout>
\ No newline at end of file
......@@ -18,6 +18,14 @@
<string name="text_me">My</string>
<string name="text_temporarily_no_data">Temporarily no data</string>
<string name="text_retry">Retry</string>
<string name="text_amount_error">Please enter the correct repayment amount</string>
<string name="account_verification_failed">Account verification failed</string>
<string name="text_me_my_loan">My Loans</string>
<string name="text_me_security_setting">Security Settings</string>
<string name="text_me_help_center">Help Center</string>
......@@ -152,7 +160,7 @@
<string name="textView_upload_photps_statement_work_card_photo_2">(If no you can wearing work uniform)</string>
<string name="text_loan_info_statement">Loan Information:</string>
<string name="text_loan_info_statement">Loan Information</string>
<string name="button_loan_info_cancel">Cancel</string>
<string name="text_loan_info_audit_passed">approved</string>
<string name="text_loan_info_loan_qualified">qualified loan</string>
......@@ -160,10 +168,13 @@
<string name="text_loan_info_loan_qualified_statement">the review has been approved</string>
<string name="text_status">Status</string>
<string name="text_setting">Setting</string>
<string name="button_logout">Log out</string>
<string name="text_days_left">Number of days left</string>
<string name="text_loan_raiders">How to Borrow</string>
<string name="text_repayment_raiders_2">How to repayment the Loan</string>
......@@ -633,6 +644,8 @@
</string>
<string name="no_lan_yet">You have no loan records yet</string>
<string name="text_day_before_yesterday">2 yesterday</string>
<string name="text_repayment_raiders_tips">You can repay the loan in the following way:</string>
<string name="textView_repayment_raiders_warns">This transaction can be done through all banks and Alfamart</string>
......@@ -985,4 +998,15 @@
<string name="new_conversation">New conversation</string>
<string name="history_conversation">History conversation</string>
<string name="text_collect_tip">
\tUntuk tujuan\n
menghindari penipuan, kami memerlukan persetujuan(otorisasi) Anda untuk memberikan Device ID, IMEI,
nomor telepon, alamat MAC dan informasi lain yang Anda miliki.
tnApabila Anda tidak memberikan persetujuan (otorisasi), maka aplikasi ini tidak dapat beroperasi.
</string>
<string name="need_allow_permission">We need you to agree to these permissions in order to continue! Do you want to continue to authorize?</string>
<string name="disable_permission">You have disabled some of the necessary permissions, please continue after granting permissions in "Settings - Applications"</string>
</resources>
\ No newline at end of file
......@@ -60,6 +60,7 @@
<string name="editText_confirm_bank_number">确认收款银行账号</string>
<string name="editText_use_loan">贷款用途</string>
<string name="account_verification_failed">账户验证失败</string>
<string name="text_title_personal_info">个人信息</string>
<string name="text_field_personal_info">个人信息</string>
......@@ -152,7 +153,7 @@
<string name="textView_upload_photps_statement_work_card_photo_2">(如果没有,你可以拍摄穿工作服照)</string>
<string name="text_loan_info_statement">贷款信息</string>
<string name="text_loan_info_statement">贷款信息</string>
<string name="button_loan_info_cancel">取消</string>
<string name="text_loan_info_audit_passed">审批通过</string>
<string name="text_loan_info_loan_qualified">贷款资格</string>
......@@ -160,6 +161,7 @@
<string name="text_loan_info_loan_qualified_statement">你已审核通过,正在放款。</string>
<string name="text_status">状态</string>
<string name="text_days_left">剩余天数</string>
<string name="button_logout">登出</string>
......@@ -167,6 +169,8 @@
<string name="text_loan_raiders">贷款指南</string>
<string name="text_repayment_raiders_2">还款指南</string>
<string name="text_temporarily_no_data">暂无数据</string>
<string name="text_title_about">关于我们</string>
<string name="text_title_helpcenter">帮助中心</string>
......@@ -184,6 +188,10 @@
</string-array>
<string name="text_retry">重试</string>
<string name="text_amount_error">请输入正确的还款金额</string>
<string name="text_title_loanraiders">贷款指南</string>
<string name="text_loanraiders_step2">在APP主页,选择贷款金额和贷款期限</string>
<string name="text_loanraiders_step3">验证你的信息大约需要5分钟时间</string>
......@@ -736,7 +744,7 @@
<string name="cancel_loan_app_alert_dialog">你确定要取消贷款吗?</string>
<string name="dialog_ensure_logout">你确定要退出吗?</string>
<string name="no_lan_yet">您还没有贷款记录</string>
<string name="payment_alfmart">ALFMART</string>
<string name="payment_bca">BCA</string>
......@@ -764,6 +772,7 @@
<string name="undang_teman">邀请好友</string>
<string name="text_pusat_kegiatan">活动中心</string>
<string name="text_setting">设置</string>
<string name="title_activity_center">活动中心</string>
<string name="title_coupon">免息优惠券</string>
......@@ -970,4 +979,15 @@
<string name="bank_repayment_statement">
付款成功后,请等待1-10分钟,Pop-Cash会给您贷款和还款的通知。如果您发现任何问题,请致电WA +86 081383163427与我们联系
</string>
<string name="text_collect_tip">
\tUntuk tujuan\n
menghindari penipuan, kami memerlukan persetujuan(otorisasi) Anda untuk memberikan Device ID, IMEI,
nomor telepon, alamat MAC dan informasi lain yang Anda miliki.
tnApabila Anda tidak memberikan persetujuan (otorisasi), maka aplikasi ini tidak dapat beroperasi.
</string>
<string name="need_allow_permission">我们需要您同意这些权限才能继续! 要继续授权吗?</string>
<string name="disable_permission">您已禁用了某些必要的权限,请在“设置 - 应用程序”中授予权限后继续</string>
</resources>
\ No newline at end of file
......@@ -7,7 +7,6 @@
<string name="text_welcome">Selamt Datang,</string>
<string name="edittext_phone_number_hint">Silahkan masukkan no ponsel anda</string>
<string name="edittext_SMS_code_hint">Silahkan masukkan kode sms</string>
<string name="button_obtain_code">Dapatkan Kode</string>
......@@ -34,6 +33,15 @@
<string name="text_about">Tentang kami</string>
<string name="text_online_QA">Layanan online</string>
<string name="account_verification_failed">Verifikasi akun gagal</string>
<string name="text_temporarily_no_data">Tidak ada data untuk sementara</string>
<string name="text_retry">Coba lagi</string>
<string name="text_amount_error">Harap masukkan jumlah pembayaran yang benar</string>
<string name="text_apply">Apply</string>
<string name="txt_upload_ID">Unggah ID foto Anda</string>
......@@ -94,6 +102,8 @@
<string name="text_expiry_date_text">Tanggal Jatuh Tempo</string>
<string name="buttom_want_to_Repay">Saya ingin mengembalikan</string>
<string name="text_days_left">Jumlah hari tersisa</string>
<string name="text_been_payment_text">Telah dikembalikan: </string>
<string name="text_total_acount">Rp. 642.000</string>
......@@ -156,7 +166,7 @@
<string name="textView_upload_photps_statement_work_card_photo_2">(Jika tidak ada anda dapat foto memakai seragam kerja)</string>
<string name="text_loan_info_statement">Informasi Pinjaman:</string>
<string name="text_loan_info_statement">Informasi Pinjaman</string>
<string name="button_loan_info_cancel">Batal</string>
<string name="text_loan_info_audit_passed">Review Lulus</string>
<string name="text_loan_info_loan_qualified">Pinjaman Memenuhi Syarat</string>
......@@ -164,6 +174,7 @@
<string name="text_loan_info_loan_qualified_statement">Review anda telah lulus, anda sedang mengajukan pinjaman</string>
<string name="text_status">Status</string>
<string name="no_lan_yet">Anda belum memiliki catatan pinjaman</string>
<string name="button_logout">Log out</string>
......@@ -247,6 +258,7 @@
<string name="text_today">Hari Ini</string>
<string name="text_yesterday">Kemarin</string>
<string name="text_setting">Pengaturan</string>
<!--Latest loan info-->
<string name="loan_app_id">ID App Pinjaman</string>
......@@ -832,8 +844,8 @@
<string name="permission_denied">Izin ditolak</string>
<string name="detect_live_face_fail">live detect gagal</string>
<string name="faceid_auth_failed" >kesalahan sistem, tidak bisa meminjamkan sekarang</string>
<string name="FACEID_AUTH_FAILED" >kesalahan sistem, tidak bisa meminjamkan sekarang</string>
<string name="faceid_auth_failed">kesalahan sistem, tidak bisa meminjamkan sekarang</string>
<string name="FACEID_AUTH_FAILED">kesalahan sistem, tidak bisa meminjamkan sekarang</string>
<string name="faceid_detect_fail">mendeteksi wajah gagal, coba yang terakhir</string>
<string name="faceid_detect_success">wajah mendeteksi kesuksesan</string>
// yitu
......@@ -998,4 +1010,15 @@ Pilih salah satu opsi berikut untuk diunggah: \n
<string name="bank_repayment_statement">
After the payment is successful, please wait 1-10 minutes, Pop-Cash will give you a notification of loan repayment.If you find any problems please contact us at WA +86 081383163427
</string>
<string name="text_collect_tip">
\tUntuk tujuan\n
menghindari penipuan, kami memerlukan persetujuan(otorisasi) Anda untuk memberikan Device ID, IMEI,
nomor telepon, alamat MAC dan informasi lain yang Anda miliki.
tnApabila Anda tidak memberikan persetujuan (otorisasi), maka aplikasi ini tidak dapat beroperasi.
</string>
<string name="need_allow_permission">Kami ingin Anda menyetujui izin ini untuk melanjutkan! Apakah Anda ingin terus memberi otorisasi?</string>
<string name="disable_permission">Anda telah menonaktifkan beberapa izin yang diperlukan, silakan lanjutkan setelah memberikan izin di "Pengaturan - Aplikasi"</string>
</resources>
......@@ -2,9 +2,9 @@
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimary">@color/main_color</item>
<item name="colorPrimaryDark">@color/main_color</item>
<item name="colorAccent">@color/main_color</item>
</style>
<style name="default_animation" parent="@android:style/Animation.Translucent">
......@@ -21,6 +21,20 @@
<item name="android:taskToBackEnterAnimation">@anim/slide_close_enter</item>
<item name="android:taskToBackExitAnimation">@anim/slide_close_exit</item>
</style>
<style name="none_animation" parent="@android:style/Animation.Translucent">
<item name="android:windowEnterAnimation">@null</item>
<item name="android:windowExitAnimation">@null</item>
<item name="android:taskOpenEnterAnimation">@null</item>
<item name="android:taskOpenExitAnimation">@null</item>
<item name="android:activityOpenEnterAnimation">@null</item>
<item name="android:activityOpenExitAnimation">@null</item>
<item name="android:activityCloseEnterAnimation">@null</item>
<item name="android:activityCloseExitAnimation">@null</item>
<item name="android:taskCloseEnterAnimation">@null</item>
<item name="android:taskCloseExitAnimation">@null</item>
<item name="android:taskToBackEnterAnimation">@null</item>
<item name="android:taskToBackExitAnimation">@null</item>
</style>
<style name="style_bg_transparent_dialog" parent="Base.Theme.AppCompat.Light.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
......@@ -43,6 +57,7 @@
<item name="android:listPreferredItemHeightSmall">?attr/qmui_list_item_height</item>
<item name="android:windowSoftInputMode">stateHidden</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowBackground">@android:color/transparent</item>
<!-- 配置qmui提供的theme -->
<item name="qmui_config_color_blue">@color/main_color</item>
......@@ -52,13 +67,22 @@
<item name="QMUITopBarStyle">@style/QDTopBar</item>
</style>
<style name="NoAnimationTheme" parent="QMTheme">
<item name="android:windowAnimationStyle">@style/none_animation</item>
</style>
<style name="BaseSplashTheme" parent="QMUI.Compat.NoActionBar">
<item name="android:windowAnimationStyle">@style/none_animation</item>
<item name="android:windowIsTranslucent">false</item>
<item name="android:windowFullscreen">true</item>
</style>
<style name="ThemeWhite" parent="QMTheme">
<item name="android:windowBackground">@android:color/white</item>
</style>
<style name="ThemeTransparent" parent="QMTheme">
<item name="android:windowBackground">@android:color/transparent</item>
</style>
<style name="QDtextAppearanceListItem">
<item name="android:textColor">?attr/qmui_config_color_black</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment