2016-11-14 6 views
1

最近Android Studio 2.2.2に更新されました。 私のアプリにテキストビューを追加しようとしています。しかし、編集したテキストをレイアウト、下の行、または別の入力を示す何かにドラッグ&ドロップすると、唯一の書式設定は、背景と同じように見えるようにします。つまり、入力にはフォーマットがありません。Android textviewの下に行がありません

何らかのフォーマットをしたいと思います。ボーダー、下の1行のいずれかをクリックすると、ユーザーはクリックして情報を入力する場所を確認できます。

これを実行するためにはどのようなプロパティが必要ですか?それらはどこで操作できますか?

これはXML

<android.support.design.widget.TextInputLayout 
    android:id="@+id/location_layout" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    tools:divider="@android:string/ok"> 

    <EditText 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:inputType="textPersonName" 
     android:text="@string/name" 
     android:ems="10" 
     android:id="@+id/editText7" 
     android:layout_below="@+id/MemeMe" 
     android:layout_centerHorizontal="true" 
     android:layout_marginTop="31dp" /> 

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

であり、これはそれが

enter image description here 通常、私はドラッグして、アンドロイドスタジオの左側にあるウィジェットバーからドロップするが、それはdoesnのしたいように見えるものですこの場合、Android Studioはこのようなことをしたように思えます。そのようなことをするためにIDEに頼るのは賢明ではありません。

答えて

1

はこれを試してみてください:

 <android.support.design.widget.TextInputLayout 
      android:id="@+id/location_layout" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 

      <EditText 
       android:id="@+id/location" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:hint="@string/location"/> 

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

アンドロイドスタジオはあなたがレイアウトをレンダリングするためのN SDKを使用していることをクラス – bdpolinsky

+0

を見つけることができない?そうならば、23以下のSDKに変更します。 –

+0

私はアンドロイド6.0のようです。marshmallow API 23 – bdpolinsky

関連する問題