2013-03-08 20 views
0
{ 
Recipedetails2 item_details = new Recipedetails2(); 
      item_details.setName("Godhumai veg adai"); 
      item_details.setIngredients("Samba godhumai rava - 1/2 cup. Bread slices - 4. Curd (thick) - 1/2 cup Carrot (grated) - 3 tsp Beetroot (grated) - 3 tsp Cabbage (grated) - 2 tsp Green chilli - 1 Ginger - a small piece Garlic - 2 cloves Salt - as neededOil - as needed "); 
      item_details.setMethods("1. Cut ginger, green chilli, garlic finely. 2. Soak samba godhumai rava in curd for half an hour. 3. Dip bread slices in water, squeeze and add to the godhumai. 4. Add carrot, beetroot ,cabbage, ginger, green chilli, garlic , salt, water and mix well to a batter. 5. Heat oil in a skillet. 6. Add ladle of batter, spread to a small thick circle and cook on both sides, dribbling oil."); 
      item_details.setImageNumber(12); 
      setUIScreen(item_details.getName(),item_details.getIngredients(),item_details.getMethods(),item_details.getImageNumber()); 
     } 

它會像來款,但我需要的是有先來點會來,然後下一行的下一個點這樣的方式,我需要,我們如何能做到在這段代碼 方法 1.混合用酪乳和麪粉加鹽。 2.在煎鍋中加熱油。 3.加入芥末,芥末醬和芥末醬,加入紅辣椒,阿魏,大豆混合物並不斷攪拌中火。 4.當內容物離開鍋的側面時,轉移到塗抹油脂的盤子上,灑上更多米拉蓋,咖喱葉,切成方塊。 我需要這樣,但其作爲一個段落來 我layout.xml文件如何將我們的動態文本逐行放入?

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 

    android:orientation="vertical" 

    > 

    <TextView android:id="@+id/name" 
     android:textSize="14sp" 
     android:textStyle="bold" 
     android:textColor="#32cd32" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     /> 

    <ImageView 
    android:id="@+id/photo" 
    android:layout_height="wrap_content" 
    android:layout_width="fill_parent" 
    android:layout_gravity="top" 
    android:padding="20dp" 
    android:scaleType="center" 
    ></ImageView> 



    <TextView 
     android:text="Ingredients:" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:gravity="left" /> 

    <TextView android:id="@+id/itemIngredients" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:scaleType="center" /> 

    <TextView 
     android:text="Method:" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:gravity="left" /> 

    <TextView android:id="@+id/methods" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:scaleType="center" /> 

</LinearLayout> 
+0

可以請你結構中的問題及其很難理解你的問題 – DjHacktorReborn 2013-03-08 12:54:23

回答

1

使用斷行字符\n換行符:

1. Mix soya flour with buttermilk, salt to a batter.\n 
2. Heat oil in a frying pan.\n 
3. Add mustard, urad dal and when mustard splutters, add red chilli, asafoetida, soya mix and stir constantly on a medium flame.\n 
4. When contents leave the sides of the pan, transfer to a greased plate, sprinkle moremilagai, curry leaves and cut into squares. 

所以,無論你想開始一個換行符,你都會輸入一個\n

+0

感謝花花公子,它的工作,這種佈局是不是滾動它不會顯示完全爲什麼花花公子 – kkarthickk 2013-03-08 13:00:09

+0

TNX花花公子我添加滾動查看其工作 – kkarthickk 2013-03-08 13:05:58

+0

@ user2118898請接受答案,如果你喜歡它。 :) – poitroae 2013-03-08 13:59:23

相關問題