当我点击EditText时片段背景变得透明,暗示颜色变化片刻,背景有时会消失,有时不会消失,这几乎是每当EditText聚焦时都会发生。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/app_small_padding">
<com.q3.npf.comman.customfont.AppTextViewBold
android:id="@+id/uldLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/uld"
android:textColor="@color/textColorGreyDark"
android:textSize="@dimen/default_txt_size" />
<com.q3.npf.comman.customfont.AppEditText
android:id="@+id/uldTxtViewDialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/uldLabel"
android:layout_marginTop="@dimen/app_small_padding_4dp"
android:layout_toLeftOf="@+id/uldScanImg"
android:background="@drawable/table_bg"
android:hint="@string/scan_uld"
android:maxLength="@integer/alternate_item_code"
android:minWidth="@dimen/min_edittext_width"
android:padding="@dimen/app_small_padding"
android:textColor="@color/textColorGreyDark"
android:textSize="@dimen/default_txt_size" />
<ImageView
android:id="@+id/uldScanImg"
android:layout_width="@dimen/scan_default_icon_size"
android:layout_height="@dimen/scan_default_icon_size"
android:layout_alignParentRight="true"
android:layout_marginLeft="@dimen/app_default_padding"
android:layout_marginRight="@dimen/app_default_padding"
android:layout_marginTop="26dp"
android:src="@drawable/scanbefore" />
</RelativeLayout>
父布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/frameLyt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true">
<FrameLayout
android:id="@+id/blurBg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blur_bg2"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/app_small_padding"
android:layout_marginRight="@dimen/app_small_padding"
android:background="@drawable/dialog_rounded_bg"
android:gravity="top"
android:orientation="vertical">
<include layout="@layout/dialog_tab_lyt" />
<RelativeLayout
android:id="@+id/itemCodeLyt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/app_default_padding"
android:visibility="gone">
<com.q3.npf.comman.customfont.AppTextViewBold
android:id="@+id/scanItemLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/item"
android:textSize="@dimen/default_txt_size" />
<com.q3.npf.comman.customfont.AppEditText
android:id="@+id/itemCodeLabelTxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/scanItemLabel"
android:layout_marginTop="@dimen/app_small_padding_4dp"
android:layout_toLeftOf="@+id/scanImg"
android:background="@drawable/edittext_rounded_bg"
android:hint="@string/item_barcode"
android:minWidth="@dimen/min_edittext_width"
android:padding="@dimen/app_small_padding"
android:textColor="@color/textColorGreyDark"
android:textSize="@dimen/default_txt_size" />
<ImageView
android:id="@+id/scanImg"
android:layout_width="@dimen/scan_default_icon_size"
android:layout_height="@dimen/scan_default_icon_size"
android:layout_alignParentRight="true"
android:layout_below="@+id/scanItemLabel"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/app_default_padding"
android:layout_marginRight="@dimen/app_default_padding"
android:layout_marginTop="@dimen/app_small_padding"
android:src="@drawable/scanbefore" />
</RelativeLayout>
<LinearLayout
android:id="@+id/uldLyt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/app_small_padding"
android:orientation="vertical"
android:visibility="visible">
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<RadioButton
android:id="@+id/scanUldRadioBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/scan_uld"
android:textSize="@dimen/default_txt_size" />
<RadioButton
android:id="@+id/generateUldRadioBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/app_small_padding"
android:checked="false"
android:text="@string/generate_uld"
android:textSize="@dimen/default_txt_size" />
</RadioGroup>
<include
layout="@layout/scan_uld_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<include layout="@layout/dialog_btn_lyt" />
</LinearLayout>
[问题] [原始对话]