TextInputLayout提示标记删除或消失

时间:2017-12-24 22:58:34

标签: android android-textinputedittext

以下是我的登录页面,但问题是突然我的TextInputLayout对我的行为很奇怪。前15天它工作得很好但是今天我写了TextInputLayout的任何值提示标签已经/隐藏了。 提前致谢.. enter image description here

<ScrollView 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="fill_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#FFFFFF"
    android:padding="10dp"
    android:fillViewport="false">

    <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:context="com.example.adil.saveothers.UserName">

        <TextView
            android:id="@+id/textView8"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="32dp"
            android:text="@string/textView_what_s_your_name"
            android:textColor="#DC143C"
            android:textSize="22sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <android.support.design.widget.TextInputLayout
            android:id="@+id/textInputLayoutFirstName"
            android:layout_width="160dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="70dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/textView8"
            android:layout_marginLeft="16dp">

            <android.support.design.widget.TextInputEditText
                android:id="@+id/textInputEditTextFirstName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:maxLength="10"
                android:inputType="textPersonName|textCapWords"
                android:hint="@string/inputLayout_hint_first_name" />
        </android.support.design.widget.TextInputLayout>

        <android.support.design.widget.TextInputLayout
            android:id="@+id/textInputLayoutLastName"
            android:layout_width="160dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="70dp"
            app:layout_constraintStart_toEndOf="@+id/textInputLayoutFirstName"
            app:layout_constraintTop_toBottomOf="@+id/textView8"
            android:layout_marginLeft="16dp">

            <android.support.design.widget.TextInputEditText
                android:id="@+id/textInputEditTextLastName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/inputLayout_hint_last_name"
                android:maxLength="10"
                android:inputType="textPersonName|textCapWords" />
        </android.support.design.widget.TextInputLayout>

        <Button
            android:id="@+id/btnNextUserNameFragment"
            android:layout_width="221dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="70dp"
            android:background="@drawable/button_ractangle_shape"
            android:text="@string/btn_UserFragment_next"
            android:textColor="#FFFFFF"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.503"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/textInputLayoutLastName"
            app:layout_constraintVertical_bias="1.0" />

    </android.support.constraint.ConstraintLayout>

</ScrollView>

My gradle file:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "com.example.adil.saveothers"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    compile 'com.github.joielechong:countrycodepicker:2.1.5'
    compile 'com.jaredrummler:material-spinner:1.2.3'
    compile 'hanks.xyz:htextview-library:0.1.5'
    implementation 'com.firebaseui:firebase-ui-database:2.3.0'

}

apply plugin: 'com.google.gms.google-services'

Now Error occur 


Error:Attribute meta-data#android.support.VERSION@value value=(26.1.0) from [com.android.support:design:26.0.0-alpha1] AndroidManifest.xml:27:9-38
is also present at [com.android.support:recyclerview-v7:26.0.1] AndroidManifest.xml:25:13-35 value=(26.0.1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.

0 个答案:

没有答案