2016-05-13 44 views
1

嗨我有很多編輯文本這個簡單的活動,但它看起來不好。我想添加一些顏色,款式的背景和移動的EditText讓這個網頁的吸引力知道,在我的應用程序中使用的顏色是橙色和藍色 在此先感謝我如何製作一個有吸引力的界面android

<?xml version="1.0" encoding="utf-8"?> 
<ScrollView 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:id="@+id/scrollView" 
    xmlns:android="http://schemas.android.com/apk/res/android" > 
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     android:orientation="vertical" android:layout_width="match_parent" 
     android:layout_height="match_parent"> 
     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Référence" 
      android:textColor="@color/colorPrimary" 
      android:layout_marginTop="70dp"/> 

     <TextView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:enabled="false" 
      android:id="@+id/editRef" /> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textColor="@color/colorPrimary" 
      android:text="Nom" /> 

     <TextView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/editName" /> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textColor="@color/colorPrimary" 
      android:text="Description" /> 

     <TextView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/editDesc" /> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textColor="@color/colorPrimary" 
      android:text="Quantité" /> 

     <TextView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/editQt" /> 
     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textColor="@color/colorPrimary" 
      android:text="Prix" /> 

     <TextView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/editprix" /> 

    </LinearLayout> 
</ScrollView> 

This is my interface 我想有這樣的接口例如或更具吸引力和組織This is my image

+0

使用此設計https://www.google.com/design/spec /style/color.html#color-color-schemes –

+0

謝謝有沒有一個android模板? –

回答

1

您可以在TextView中使用HTML這樣的:

myTextView.setText(Html.fromHtml("<h2>Title</h2><br><p>Description here</p>")); 

而且,你的活動有一些TextView的,不EditText上

+1

爲什麼你會使用html來設計一個android應用程序 –

+0

我已經使用android:textColor =「@ color/colorPrimary」,但是我的界面仍然不好。 textview的配置很糟糕。我想將它們放置在界面中並添加樣式來製作漂亮的界面 –

0

。對於設定顏色,你可以使用

String text = "<font color=#cc0029>Erste Farbe</font> <font color=#ffcc00>zweite Farbe</font>"; 
yourtextview.setText(Html.fromHtml(text)); 

對於風格和背景看這裏 styles

+0

我已經使用了android:textColor =「@ color/colorPrimary」但我的界面仍然不好。 textview的配置很糟糕。我想把它們放在界面中,並添加樣式來創建一個漂亮的界面 –

+0

你可以舉一些例子它應該是什麼樣子。 –

+0

我沒有一個清晰的想法,但我想要有一個像我在第一篇文章中添加的圖像那樣的界面。我更新了它 –

相關問題