2016-05-05 18 views
-1

アプリを公開するときにどのようにあなたが唯一のAndroid Studioで、多分デバッグにデザイナーに表示されますテキストビューにいくつかのテンプレートテキストを追加しますが、ありませんが公開されることのTextViewにテンプレートのテキストを追加します?どのようにあなたが文句を言わない

答えて

2

tools属性を追加すると、テキストはdesign領域にのみ表示され、実行時には表示されません。

<FrameLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:tools="http://schemas.android.com/tools" <!--add this--> 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      tools:text="examle text" 
      android:textColor="@color/colorLightGray"/> 

</FrameLayout> 
+2

「ツール」ネームスペースでさらに多くのことができます:http://tools.android.com/tips/layout-designtime-attributes –

関連する問題