Commit d705b072 authored by 赵鹏翔's avatar 赵鹏翔

日志浏览组件添加

parent 512fdfe6
......@@ -76,15 +76,15 @@ public class CustomImageCenterDialog extends Dialog{
super(context, R.style.CommonDialog);
initWindows();
setCanceledOnTouchOutside(false);
// setContentView(R.layout.dialog_center_image);
setContentView(R.layout.dialog_center_image);
setCancelable(true);
initView();
}
private void initView() {
// tvOk = findViewById(R.id.tvOk);
// tvHint = findViewById(R.id.tvSubContent);
// ivContent = findViewById(R.id.ivContent);
tvOk = findViewById(R.id.tvOk);
tvHint = findViewById(R.id.tvSubContent);
ivContent = findViewById(R.id.ivContent);
}
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Button正常状态下的背景 -->
<item android:drawable="@drawable/shape_dialog_btn_normal_bg" android:state_pressed="false" />
<!-- Button按下时的背景 -->
<item android:drawable="@drawable/shape_dialog_btn_pressed_bg" android:state_pressed="true"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent"
android:layout_height="match_parent"
android:background="#11000000">
<android.widget.LinearLayout
android:id="@+id/llDialog"
android:layout_width="600dp"
android:layout_height="wrap_content"
android:background="@drawable/shape_border_d1d1dc_solid_white_radius16"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/ivContent"
android:layout_width="match_parent"
android:layout_height="500dp"
android:layout_gravity="center_vertical"
android:layout_marginTop="75dp"
android:gravity="center_horizontal"
android:paddingLeft="60dp"
android:paddingRight="60dp"
tools:src="@tools:sample/avatars"/>
<TextView
android:id="@+id/tvSubContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="60dp"
android:layout_marginTop="20dp"
android:layout_marginRight="60dp"
android:textColor="@color/black"
android:textSize="30sp"
android:visibility="visible"
tools:text="请将日志二维码拍照保存" />
<TextView
android:id="@+id/tvOk"
android:layout_width="match_parent"
android:layout_gravity="center"
android:padding="20dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/selector_dialog_btn"
android:gravity="center"
android:text="保存好了"
android:textColor="@color/green"
android:textSize="40sp" />
</android.widget.LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
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