{
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.当内容物离开锅壁时,转移到上了油脂的盘子上,撒上Moremilagai,咖喱叶,然后切成正方形。
我需要这样,但它作为一个段落来
我的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>
最佳答案
使用换行符\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
。