<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="@color/transparent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_gravity="bottom"
android:gravity="center_vertical"
android:id="@+id/subtitlePanel"
android:background="#66000000"
android:layout_height="wrap_content">
<ImageButton
android:layout_width="50dp"
android:id="@+id/subtitleLeftButton"
android:background="@color/transparent"
android:src="@drawable/ic_keyboard_arrow_left_24dp"
android:layout_height="50dp"/>
<TextView
android:layout_width="match_parent"
tools:text="textsd"
android:gravity="center"
android:id="@+id/subtitleText"
android:textSize="16sp"
android:lines="2"
android:textColor="#fff"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<ImageButton
android:layout_width="50dp"
android:id="@+id/subtitleRightButton"
android:background="@color/transparent"
android:src="@drawable/ic_keyboard_arrow_right_24dp"
android:layout_height="50dp"/>
</LinearLayout>
</FrameLayout>
如果将语言更改为阿拉伯语,则向右看的箭头会发生变化。Tobish 她向左看。
是否可以在 Android 中使用某些参数在 XML 中说,当更改 ImageButton 中的 RTL 语言时,不要更改它。像 RTL 禁用之类的东西。我需要这个特定的视图不对更改 RTL ImageButton 做出反应
可以在 AndroidManifest.xml 中为整个应用程序禁用:
如果
ic_keyboard_arrow_right_24dp
- 矢量图像,则您可以更改(API 19+):您还可以使用文件夹: