Skip to content

Commit

Permalink
优化ui显示
Browse files Browse the repository at this point in the history
  • Loading branch information
hss01248 committed Dec 9, 2022
1 parent 475232e commit f19c20d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ScrollView;
Expand All @@ -29,17 +29,17 @@ public class IosAlertDialogHolder extends SuperLvHolder<ConfigBean> {
public EditText et1;
public EditText et2;
protected View line;
protected Button btn1;
protected TextView btn1;
protected View lineBtn2;
protected Button btn2;
protected TextView btn2;
protected View lineBtn3;
protected Button btn3;
protected TextView btn3;
protected LinearLayout llContainerHorizontal;
protected Button btn1Vertical;
protected TextView btn1Vertical;
protected View lineBtn2Vertical;
protected Button btn2Vertical;
protected TextView btn2Vertical;
protected View lineBtn3Vertical;
protected Button btn3Vertical;
protected TextView btn3Vertical;
protected LinearLayout llContainerVertical;
protected ScrollView sv;
protected LinearLayout llContainerContent;
Expand All @@ -58,17 +58,17 @@ protected void findViews() {
et1 = (EditText) rootView.findViewById(R.id.et_1);
et2 = (EditText) rootView.findViewById(R.id.et_2);
line = (View) rootView.findViewById(R.id.line);
btn1 = (Button) rootView.findViewById(R.id.btn_1);
btn1 = (TextView) rootView.findViewById(R.id.btn_1);
lineBtn2 = (View) rootView.findViewById(R.id.line_btn2);
btn2 = (Button) rootView.findViewById(R.id.btn_2);
btn2 = (TextView) rootView.findViewById(R.id.btn_2);
lineBtn3 = (View) rootView.findViewById(R.id.line_btn3);
btn3 = (Button) rootView.findViewById(R.id.btn_3);
btn3 = (TextView) rootView.findViewById(R.id.btn_3);
llContainerHorizontal = (LinearLayout) rootView.findViewById(R.id.ll_container_horizontal);
btn1Vertical = (Button) rootView.findViewById(R.id.btn_1_vertical);
btn1Vertical = (TextView) rootView.findViewById(R.id.btn_1_vertical);
lineBtn2Vertical = (View) rootView.findViewById(R.id.line_btn2_vertical);
btn2Vertical = (Button) rootView.findViewById(R.id.btn_2_vertical);
btn2Vertical = (TextView) rootView.findViewById(R.id.btn_2_vertical);
lineBtn3Vertical = (View) rootView.findViewById(R.id.line_btn3_vertical);
btn3Vertical = (Button) rootView.findViewById(R.id.btn_3_vertical);
btn3Vertical = (TextView) rootView.findViewById(R.id.btn_3_vertical);
llContainerVertical = (LinearLayout) rootView.findViewById(R.id.ll_container_vertical);
sv = (ScrollView) rootView.findViewById(R.id.sv);
llContainerContent = (LinearLayout) rootView.findViewById(R.id.ll_container);
Expand Down Expand Up @@ -331,8 +331,6 @@ private void setInputStyle(Context context, ConfigBean bean) {
et1.setText(bean.inputText1);
et1.setSelection(bean.inputText1.length());
}


}

if (TextUtils.isEmpty(bean.hint2)) {
Expand Down
16 changes: 8 additions & 8 deletions dialog/src/main/res/layout/dialog_ios_alert.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
app:cardBackgroundColor="#ffffff"
app:cardCornerRadius="20dp"
app:cardCornerRadius="12dp"
app:cardElevation="0dp"
app:cardMaxElevation="0dp"
android:layout_height="wrap_content">
Expand Down Expand Up @@ -101,18 +101,18 @@
android:layout_width="match_parent"
android:minHeight="48dp"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatButton
<TextView
android:id="@+id/btn_1"
android:textAllCaps="false"
android:text="@string/dialogutil_btn_sure"
android:layout_gravity="center"
android:padding="5dp"
android:minHeight="48dp"
android:textStyle="normal"
android:gravity="center"
android:background="@drawable/btn_bg_selector_dialog"
android:textSize="@dimen/dialogutil_btn_txt_size"
android:textColor="@color/dialogutil_ios_btntext_blue"

android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
Expand All @@ -122,7 +122,7 @@
android:background="@color/dialogutil_line_dd"
android:layout_width="1px"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatButton
<TextView
android:id="@+id/btn_2"
android:text="@string/dialogutil_btn_cancel"
android:layout_gravity="center"
Expand All @@ -143,7 +143,7 @@
android:background="@color/dialogutil_line_dd"
android:layout_width="1px"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatButton
<TextView
android:layout_gravity="center"
android:padding="5dp"
android:id="@+id/btn_3"
Expand All @@ -170,7 +170,7 @@
android:layout_width="match_parent"
android:minHeight="48dp"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatButton
<TextView
android:id="@+id/btn_1_vertical"
android:text="1"
android:layout_gravity="center"
Expand All @@ -189,7 +189,7 @@
android:background="@color/dialogutil_line_dd"
android:layout_width="match_parent"
android:layout_height="1px"/>
<androidx.appcompat.widget.AppCompatButton
<TextView
android:id="@+id/btn_2_vertical"
android:text="2"
android:layout_gravity="center"
Expand All @@ -209,7 +209,7 @@
android:background="@color/dialogutil_line_dd"
android:layout_width="match_parent"
android:layout_height="1px"/>
<androidx.appcompat.widget.AppCompatButton
<TextView
android:layout_gravity="center"
android:padding="5dp"
android:id="@+id/btn_3_vertical"
Expand Down
120 changes: 0 additions & 120 deletions dialog/src/main/res/layout/dialog_ios_alert_vertical.xml

This file was deleted.

0 comments on commit f19c20d

Please sign in to comment.