]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/simple_spinner_dropdown_item_huawei_fix.xml
Use a custom spinner layout on Huawei phones running API 24. Fixes https://redmine...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / simple_spinner_dropdown_item_huawei_fix.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3     Modifications copyright © 2017 Soren Stoutner <soren@stoutner.com>.
4
5     `simple_spinner_dropdown_item_huawei_fix.xml` comes from the Android API 25 platform SDK, and is usually referenced as `android.R.layout.simple_spinner_dropdown_item`.
6
7     The licensing information for the original file is below:
8
9     //device/apps/common/assets/res/any/layout/simple_spinner_item.xml
10
11     Copyright 2008, The Android Open Source Project
12
13     Licensed under the Apache License, Version 2.0 (the "License")
14     you may not use this file except in compliance with the License.
15     You may obtain a copy of the License at
16
17         http://www.apache.org/licenses/LICENSE-2.0
18
19     Unless required by applicable law or agreed to in writing, software
20     distributed under the License is distributed on an “AS IS” BASIS,
21     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22     See the License for the specific language governing permissions and
23     limitations under the License. -->
24
25 <!-- Huawei did something to their customizations to Android 7.0 (API 24) to break scrolling on `spinners`.  Modifying this file to set `android:layout_height="wrap_content"` resolves the issue. -->
26 <CheckedTextView
27     xmlns:android="http://schemas.android.com/apk/res/android"
28     android:id="@android:id/text1"
29     android:layout_height="wrap_content"
30     android:layout_width="match_parent"
31     style="?android:attr/spinnerDropDownItemStyle"
32     android:maxLines="1"
33     android:ellipsize="marquee" />