我试图在英文版的主屏幕上排列我的图标,这没关系,但是当将语言切换到阿拉伯语版本时,主屏幕的排列方式不合适,每个图标都远离另一个..
我该如何解决这个问题?
这是整个主屏幕 XML 代码:
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/pic2"
android:gravity="clip_vertical|clip_horizontal"
android:orientation="vertical"
android:padding="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_vertical_margin"
android:paddingTop="@dimen/activity_horizontal_margin"
tools:context=".MainActivity" >
<Button
android:id="@+id/courses"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/academic_text "
android:layout_alignRight="@+id/contacts_text "
android:background="@drawable/courses" />
<TextView
android:id="@+id/contacts_text "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/contacts"
android:layout_centerHorizontal="true"
android:layout_weight="0.00"
android:text="@string/contacts"
android:textColor="@color/lomon_chiffon"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="serif" />
<Button
android:id="@+id/ouwebsite"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_alignBaseline="@+id/aouwebsite"
android:layout_alignBottom="@+id/aouwebsite"
android:layout_toLeftOf="@+id/aouwebsite"
android:background="@drawable/ou_website1" />
<TextView
android:id="@+id/courses_text "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/courses"
android:layout_below="@+id/courses"
android:text="@string/courses"
android:textColor="@color/lomon_chiffon"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="serif" />
<Button
android:id="@+id/aouwebsite"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_alignBaseline="@+id/facebook"
android:layout_alignBottom="@+id/facebook"
android:layout_toLeftOf="@+id/facebook"
android:background="@drawable/aou_website99" />
<Button
android:id="@+id/facebook"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_alignBaseline="@+id/twitter"
android:layout_alignBottom="@+id/twitter"
android:layout_toLeftOf="@+id/twitter"
android:background="@drawable/facebook" />
<Button
android:id="@+id/contacts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/about"
android:layout_alignBottom="@+id/about"
android:layout_alignRight="@+id/courses_text "
android:background="@drawable/contacts" />
<TextView
android:id="@+id/about_text "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/about"
android:layout_below="@+id/about"
android:layout_weight="0.00"
android:text="@string/about"
android:textColor="@color/lomon_chiffon"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="serif" />
<TextView
android:id="@+id/news_text "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/about"
android:layout_alignLeft="@+id/student"
android:layout_weight="0.00"
android:text="@string/news"
android:textColor="@color/lomon_chiffon"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="serif" />
<TextView
android:id="@+id/academic_text "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/academic_calendar"
android:layout_below="@+id/academic_calendar"
android:layout_weight="0.00"
android:text="@string/academic_calendar"
android:textColor="@color/lomon_chiffon"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="serif" />
<Button
android:id="@+id/about"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/academic_text "
android:layout_below="@+id/academic_text "
android:layout_marginTop="24dp"
android:background="@drawable/about1" />
<Button
android:id="@+id/twitter"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="@drawable/twitter" />
<Button
android:id="@+id/academic_calendar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/facebook"
android:layout_alignParentTop="true"
android:background="@drawable/calendar" />
<Button
android:id="@+id/news"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/news_text "
android:layout_alignLeft="@+id/news_text "
android:background="@drawable/news1" />
<Button
android:id="@+id/student"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/student_text "
android:layout_marginRight="40dp"
android:layout_toLeftOf="@+id/contacts_text "
android:background="@drawable/email" />
<TextView
android:id="@+id/student_text "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/contacts"
android:layout_marginRight="26dp"
android:layout_toLeftOf="@+id/contacts_text "
android:layout_weight="0.00"
android:text="@string/student_email"
android:textColor="@color/lomon_chiffon"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="serif" />