單人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();
|
||||
}
|
||||
}
|
||||
56
common/src/main/res/layout/view_yoursystemisolder.xml
Normal file
56
common/src/main/res/layout/view_yoursystemisolder.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="277dp"
|
||||
android:layout_height="133.67dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16.33dp"
|
||||
android:layout_marginTop="24.67dp"
|
||||
android:text="@string/yoursystemisolder"
|
||||
android:textColor="#161616"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="33.67dp"
|
||||
android:layout_marginBottom="23.67dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/to_set_up"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/to_set_up"
|
||||
android:visibility="gone"
|
||||
android:textColor="#B1B1B1"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/know_the"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23.33dp"
|
||||
android:text="@string/know_the"
|
||||
android:textColor="#FFAF08"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
Reference in New Issue
Block a user