2017-12-24 18 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 대신 을 사용해야합니다 글고

<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'

그라데이션 파일

이 지원 라이브러리를 추가하고 당신은 당신의 코드를 제공하지 않는 경우 우리는 당신을 도울 기대 방법은

enter image description here