In your style.xml
put:
<item name="homeAsUpIndicator">@drawable/ic_arrow_back</item>
And create a drawable-ldrtl-xhdpi-v17
folder in res
and put proper drawable (RTL drawable).
Solution 1 :
You can generate duplicates and keep versions in proper directories (eg drawable-ar).
Solution 2 (My Fav)
Fortunately, there is an easy way around. You just need to use styles.
values/styles.xml
<style name="MirroredImage" />
values-ar/styles.xml
<style name="MirroredImage">
<item name="android:scaleX">-1</item>
</style>
my_layout.xml
<ImageView
style="@style/MirroredImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_to_be_mirrored"/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.