I have a question here. How to flip (vertically/horizontally) a linearlayout in eclipse? I mean, I have a project which to put 10 different language into that layout. The one that bothering me is how to put Arabic and Persian language since the writing is start from right. So I think a solution which is to flip the layout when it detect that the language is Arabic or Persian. But I don't know how do it. I appreciate with every help here. thanks :)
我在这里有一个问题。如何在日食中翻转(垂直/水平)线性布局?我的意思是,我有一个项目可以将10种不同的语言放入该布局中。困扰我的是如何使用阿拉伯语和波斯语,因为写作是从右边开始的。所以我认为一种解决方案是在检测到语言是阿拉伯语或波斯语时翻转布局。但我不知道怎么做。我非常感谢这里的每一个帮助。谢谢 :)
below is the code for my layout:
下面是我的布局代码:
<LinearLayout
android:id="@+id/chcall_tv_asia_LinearLayout09"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#7F000000"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/chcall_tv_asia_LinearLayout10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="11dp"
android:layout_marginTop="3dp"
android:orientation="vertical" >
<TextView
android:id="@+id/tv_asia_service_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-3dp"
android:textSize="13dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/chcall_tv_asia_LinearLayout11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="11dp"
android:orientation="vertical" >
<TextView
android:id="@+id/tv_asia_program_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-3dp"
android:textSize="25dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/chcall_tv_asia_LinearLayout12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp" >
<TextView
android:id="@+id/tv_asia_audio_type"
android:layout_width="89dp"
android:layout_height="wrap_content"
android:textSize="13dp" />
<TextView
android:id="@+id/tv_asia_audio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="13dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/chcall_tv_asia_LinearLayout13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp" >
<TextView
android:id="@+id/tv_asia_video_type"
android:layout_width="89dp"
android:layout_height="wrap_content"
android:textSize="13dp" />
<TextView
android:id="@+id/tv_asia_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="13dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/chcall_tv_asia_LinearLayout14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="9dp"
android:layout_marginLeft="18dp" >
<TextView
android:id="@+id/tv_asia_subtitle_type"
android:layout_width="89dp"
android:layout_height="wrap_content"
android:textSize="13dp" />
<TextView
android:id="@+id/tv_asia_subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="13dp" />
</LinearLayout>
</LinearLayout>
i just want to flip the chcall_tv_asia_LinearLayout09
vertically, so that all the content in the layout also will be flipped.
我只想垂直翻转chcall_tv_asia_LinearLayout09,以便翻转布局中的所有内容。
1 个解决方案
#1
0
I succeed to flip my LinearLayout. just add android:rotationY="180"
.
我成功翻转了我的LinearLayout。只需添加android:rotationY =“180”。
#1
0
I succeed to flip my LinearLayout. just add android:rotationY="180"
.
我成功翻转了我的LinearLayout。只需添加android:rotationY =“180”。