Commit 7ebc0813 by sikang

FB登录跳转SMS登录

parent 797164da
package com.common.base;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.multidex.MultiDexApplication;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import tech.starwin.LibConfig;
import tech.starwin.network.Gateway;
import tech.starwin.utils.InstallReferrerHelper;
import tech.starwin.utils.context_utils.AppLanguageUtils;
......
package com.common.widget;
import android.content.Context;
import android.support.annotation.LayoutRes;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
/**
* Created by SiKang on 2019/5/21.
*/
public class FloatView {
private View rootView;
private Context context;
public FloatView(Context context) {
this.context = context;
}
public void bindLayout(@LayoutRes int layout, float x, float y, OnLayoutListener onLayoutListener) {
rootView = LayoutInflater.from(context).inflate(layout, null);
onLayoutListener.onLayout(rootView);
WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
manager.addView(rootView, rootView.getLayoutParams());
setLocatioin(x, y);
}
public void bindLayout(View view, float x, float y) {
rootView = view;
WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
layoutParams.width = WindowManager.LayoutParams.WRAP_CONTENT;
layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
manager.addView(rootView, layoutParams);
setLocatioin(x, y);
}
private void setLocatioin(float x, float y) {
WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
WindowManager.LayoutParams layoutParams = (WindowManager.LayoutParams) rootView.getLayoutParams();
DisplayMetrics dm = new DisplayMetrics();
manager.getDefaultDisplay().getMetrics(dm);
layoutParams.x = (int) (dm.widthPixels * x);
layoutParams.y = (int) (dm.heightPixels * y);
rootView.setLayoutParams(layoutParams);
}
public interface OnLayoutListener {
void onLayout(View view);
}
}
......@@ -85,6 +85,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
public void accept(GatewayInfoBean gatewayInfoBean) throws Exception {
Gateway.setGatewayInfoBean(gatewayInfoBean);
getCustomerMsg("");
view.onHttpSuccess("",null);
EventBus.getDefault().post(ActionEnum.GATEWAY_UPDATED);
}
});
......
......@@ -21,6 +21,8 @@
<string name="text_completed">Lengkap</string>
<string name="text_certification2">Bukti</string>
<string name="text_me">Saya</string>
<string name="text_can_not_login">Tidak bisa masuk?</string>
<string name="loan_duration">Durasi Pinjaman</string>
......
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