Merge pull request #11252 from osmandapp/MenuItem-icon-fix-rtl

Menu item icon fix rtl
This commit is contained in:
Vitaliy 2021-03-25 13:40:10 +02:00 committed by GitHub
commit 66f4b97b91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 197 additions and 213 deletions

View file

@ -1,29 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dip"
android:layout_marginRight="-8dip"
android:layout_marginStart="8dip"
android:layout_marginEnd="-8dip"
android:layout_marginTop="8dip"
android:layout_marginBottom="8dip"
android:layout_marginLeft="8dp"
android:layout_marginRight="-8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="-8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:scaleType="centerInside"
android:duplicateParentState="true"/>

View file

@ -1,232 +1,230 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?attr/bottom_menu_view_bg"
android:orientation="horizontal"
tools:context="net.osmand.plus.download.ui.DataStoragePlaceDialogFragment">
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?attr/bottom_menu_view_bg"
android:orientation="horizontal"
tools:context="net.osmand.plus.download.ui.DataStoragePlaceDialogFragment">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/folderIconImageView"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginRight="@dimen/content_padding"
android:layout_marginTop="4dp"
android:layout_row="0"
android:scaleType="center"
tools:background="@color/color_warning"
tools:src="@drawable/ic_action_folder"
android:layout_marginEnd="@dimen/content_padding" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/folderIconImageView"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:scaleType="center"
tools:background="@color/color_warning"
tools:src="@drawable/ic_action_folder" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:layout_weight="1"
android:paddingTop="22dp"
android:text="@string/application_dir"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/dialog_header_text_size"/>
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:layout_weight="1"
android:paddingTop="22dp"
android:text="@string/application_dir"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/dialog_header_text_size" />
<ImageButton
android:id="@+id/closeImageButton"
android:contentDescription="@string/shared_string_close"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="44dp"
android:layout_height="44dp"
osmand:srcCompat="@drawable/ic_action_remove_dark"
tools:background="@color/color_warning"/>
<ImageButton
android:id="@+id/closeImageButton"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="44dp"
android:layout_height="44dp"
android:contentDescription="@string/shared_string_close"
osmand:srcCompat="@drawable/ic_action_remove_dark"
tools:background="@color/color_warning" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:layout_marginBottom="24dp"
android:layout_marginTop="4dp"
android:textColor="?android:textColorSecondary"
android:text="@string/application_dir_description"
android:textSize="16sp"/>
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:layout_marginTop="4dp"
android:layout_marginBottom="24dp"
android:text="@string/application_dir_description"
android:textColor="?android:textColorSecondary"
android:textSize="16sp" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/deviceMemoryRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/deviceMemoryRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/deviceMemoryImageView"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingRight="@dimen/content_padding"
android:scaleType="center"
osmand:srcCompat="@drawable/ic_action_phone"
tools:background="@color/color_warning"
android:paddingEnd="@dimen/content_padding" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/deviceMemoryImageView"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:scaleType="center"
osmand:srcCompat="@drawable/ic_action_phone"
tools:background="@color/color_warning" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/deviceMemoryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:gravity="center_vertical"
android:text="@string/storage_directory_external"
android:textColor="?android:attr/textColorPrimary"
/>
<TextView
android:id="@+id/deviceMemoryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:text="@string/storage_directory_external"
android:textColor="?android:attr/textColorPrimary" />
<TextView
android:id="@+id/deviceMemoryDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 568 Mb"/>
<TextView
android:id="@+id/deviceMemoryDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 568 Mb" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/divSharedStorage"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="fill_horizontal"
android:background="@color/divider_color"/>
<View
android:id="@+id/divSharedStorage"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="fill_horizontal"
android:background="@color/divider_color" />
<LinearLayout
android:id="@+id/sharedMemoryRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/sharedMemoryRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/sharedMemoryImageView"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingRight="@dimen/content_padding"
android:scaleType="center"
osmand:srcCompat="@drawable/ic_action_phone"
tools:background="@color/color_warning"
android:paddingEnd="@dimen/content_padding" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/sharedMemoryImageView"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:scaleType="center"
osmand:srcCompat="@drawable/ic_action_phone"
tools:background="@color/color_warning" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/sharedMemoryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:text="@string/storage_directory_shared"
android:textColor="?android:attr/textColorPrimary"/>
<TextView
android:id="@+id/sharedMemoryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_directory_shared"
android:textColor="?android:attr/textColorPrimary" />
<TextView
android:id="@+id/sharedMemoryDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 9 Gb"/>
<TextView
android:id="@+id/sharedMemoryDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 9 Gb" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/divExtStorage"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="fill_horizontal"
android:background="@color/divider_color"/>
<View
android:id="@+id/divExtStorage"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="fill_horizontal"
android:background="@color/divider_color" />
<LinearLayout
android:id="@+id/memoryStickRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/memoryStickRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/memoryStickImageView"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingRight="@dimen/content_padding"
android:scaleType="center"
osmand:srcCompat="@drawable/ic_sdcard"
tools:background="@color/color_warning"
android:paddingEnd="@dimen/content_padding" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/memoryStickImageView"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:scaleType="center"
osmand:srcCompat="@drawable/ic_sdcard"
tools:background="@color/color_warning" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/memoryStickTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:text="@string/storage_directory_card"
android:textColor="?android:attr/textColorPrimary"/>
<TextView
android:id="@+id/memoryStickTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_directory_card"
android:textColor="?android:attr/textColorPrimary" />
<TextView
android:id="@+id/memoryStickDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 9 Gb"/>
<TextView
android:id="@+id/memoryStickDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
tools:text="Free: 9 Gb" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>
</LinearLayout>
</LinearLayout>
</LinearLayout>