2017-12-24 13 views
0

以下はログインページですが、突然私のTextInputLayoutが私と奇妙な動作をしています。最初の15日間はうまくいきましたが、今日はTextInputLayoutの値ヒントタグを書きました。事前に 感謝.. enter image description hereTextInputLayoutヒントタグの削除または削除

<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#[email protected] 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

の作品みては? – kalabalik

+0

こんにちはムハンマド、あなたは以下の答えをチェックしましたか、あなたの問題を解決します – Thunder

+0

私はまだ問題があります。ヒントは含まれていますが、浮動タグは表示されません。 –

答えて

0

この問題を解決するために、あなたがTextInputLayoutにヒントを提供し、TextInputEditTextの代わりを使用しなければならないのEditText

<android.support.design.widget.TextInputLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:hint="Your Hint Label here"> 

    <android.support.v7.widget.TextInputEditText 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:hint="Your Value Here" /> 

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

のみ変更私がやりました私はちょうど追加されましたcompile 'com.android.support:design:26.0.0-alpha1'

in gradle file。

は、このサポートライブラリを追加し、それはあなたのコードを提供しない場合は、私たちはあなたを助けることを期待するにはどうすればよい

enter image description here

関連する問題