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. 当内容物离开锅边时,转移到抹了油的盘子上,撒上更多的milagai,咖喱叶,切成方块。 我需要这样,但它作为一个段落出现,我的 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>
4

1 回答 1

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.

于 2013-03-08T12:53:44.317 回答