單人PK卡0分 優化計算中
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class YoursystemisolderDialog extends AbsDialogFragment {
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_yoursystemisolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDialogStyle() {
|
||||
return R.style.dialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canCancel() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setWindowAttributes(Window window) {
|
||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = DpUtil.dp2px(277);
|
||||
params.height = DpUtil.dp2px(134);
|
||||
params.gravity = Gravity.CENTER;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
TextView hint = (TextView) findViewById(R.id.hint);
|
||||
TextView toSetUp = (TextView) findViewById(R.id.to_set_up);
|
||||
TextView knowThe = (TextView) findViewById(R.id.know_the);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.to_set_up), () -> dismiss());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||
try {
|
||||
super.show(manager, tag);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private YoursystemisolderDialog.HintListener listener;
|
||||
|
||||
public YoursystemisolderDialog setListener(YoursystemisolderDialog.HintListener listener) {
|
||||
this.listener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface HintListener {
|
||||
void requestPermission();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user