切换按钮无法正常工作

时间:2017-11-08 11:03:14

标签: android toggle

我面临来自android的奇怪行为。 基本上我在这里添加了相对布局中的标题测试,并在下面添加了滚动视图。

enter image description here

感谢任何帮助,提前致谢。

这是我的切换按钮代码

<android.support.design.widget.TextInputLayout
                android:id="@+id/login_confirmPasswordLay"
                android:layout_width="match_parent"
                android:theme="@style/TextLabel1"
                app:passwordToggleEnabled="true"
                app:passwordToggleTint="@color/login_txt_color"
                android:layout_height="wrap_content">

                <com.orbiosolutions.yabeee.CustomClasses.CustomEditText
                    android:id="@+id/login_signUpConfirmPasswordTxt"
                    android:textColor="@color/login_txt_color"
                    android:layout_width="match_parent"
                    android:textSize="@dimen/login_med_txt_size"
                    android:maxLength="@integer/password_max_length"
                    android:layout_height="wrap_content"
                    android:inputType="textPassword"
                    android:maxLines="1"
                    android:hint="@string/re_type_password" />

            </android.support.design.widget.TextInputLayout>

抱歉,我无法添加整个代码堆栈溢出抛出错误

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <RelativeLayout
        android:layout_width="match_parent"
        android:id="@+id/login_titleLay"
        android:background="@color/colorWhite"
        android:layout_height="wrap_content">

    <com.orbiosolutions.yabeee.CustomClasses.CustomBoldTextView
        android:layout_width="match_parent"
        android:layout_height="@dimen/smallButtonHeight"
        android:id="@+id/login_signUpTitleTxt"
        android:layout_marginTop="@dimen/login_large_margin"
        android:layout_marginLeft="@dimen/login_large_margin"
        android:layout_marginBottom="@dimen/login_large_margin"
        android:textSize="@dimen/login_large_txt_size"
        android:textColor="@color/text_header"
        android:text="@string/signup_here"/>

    </RelativeLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:scrollbars="none"
        android:layout_below="@+id/login_titleLay"
        android:id="@+id/login_signUpLay"
        android:layout_height="wrap_content">

        <LinearLayout
            android:layout_width="match_parent"
            android:orientation="vertical"
            android:layout_marginBottom="@dimen/login_large_margin"
            android:layout_marginRight="@dimen/login_large_margin"
            android:layout_marginLeft="@dimen/login_large_margin"
            android:layout_height="match_parent">

...........................
         <android.support.design.widget.TextInputLayout
                android:id="@+id/login_confirmPasswordLay"
                android:layout_width="match_parent"
                android:theme="@style/TextLabel1"
                app:passwordToggleEnabled="true"
                app:passwordToggleTint="@color/login_txt_color"
                android:layout_height="wrap_content">

                <com.orbiosolutions.yabeee.CustomClasses.CustomEditText
                    android:id="@+id/login_signUpConfirmPasswordTxt"
                    android:textColor="@color/login_txt_color"
                    android:layout_width="match_parent"
                    android:textSize="@dimen/login_med_txt_size"
                    android:maxLength="@integer/password_max_length"
                    android:layout_height="wrap_content"
                    android:inputType="textPassword"
                    android:maxLines="1"
                    android:hint="@string/re_type_password" />

            </android.support.design.widget.TextInputLayout>

    ....................
        </LinearLayout>

    </ScrollView>


</RelativeLayout>

0 个答案:

没有答案