Add accessibility label for "QR code" image.
Also added landscape mode. Test: atest Bug: 354116021 Flag: com.android.settingslib.flags.enable_le_audio_sharing Change-Id: Ide20e07f38660ef7f444fbe3b20d3364b9951e02
This commit is contained in:
62
res/layout-land/bluetooth_audio_streams_qr_code.xml
Normal file
62
res/layout-land/bluetooth_audio_streams_qr_code.xml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (C) 2023 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="25dp"
|
||||||
|
android:baselineAligned="false">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@android:id/summary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="start"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="?android:attr/textColorPrimary" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/qrcode_view"
|
||||||
|
android:layout_width="@dimen/qrcode_size"
|
||||||
|
android:layout_height="@dimen/qrcode_size"
|
||||||
|
android:contentDescription="@string/audio_streams_qr_code_page_image_label"
|
||||||
|
android:focusable="true" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/password"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="?android:attr/textColorPrimary" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@@ -47,7 +47,9 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/qrcode_view"
|
android:id="@+id/qrcode_view"
|
||||||
android:layout_width="@dimen/qrcode_size"
|
android:layout_width="@dimen/qrcode_size"
|
||||||
android:layout_height="@dimen/qrcode_size"/>
|
android:layout_height="@dimen/qrcode_size"
|
||||||
|
android:contentDescription="@string/audio_streams_qr_code_page_image_label"
|
||||||
|
android:focusable="true"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/password"
|
android:id="@+id/password"
|
@@ -13742,6 +13742,8 @@
|
|||||||
<string name="audio_streams_main_page_qr_code_scanner_summary">Scan an audio stream QR code to listen with <xliff:g example="LE headset" id="device_name">%1$s</xliff:g></string>
|
<string name="audio_streams_main_page_qr_code_scanner_summary">Scan an audio stream QR code to listen with <xliff:g example="LE headset" id="device_name">%1$s</xliff:g></string>
|
||||||
<!-- Le audio streams password dialog [CHAR LIMIT=NONE] -->
|
<!-- Le audio streams password dialog [CHAR LIMIT=NONE] -->
|
||||||
<string name="audio_streams_main_page_password_dialog_cannot_edit">Can\u0027t edit password while sharing. To change the password, first turn off audio sharing.</string>
|
<string name="audio_streams_main_page_password_dialog_cannot_edit">Can\u0027t edit password while sharing. To change the password, first turn off audio sharing.</string>
|
||||||
|
<!-- Text for audio sharing qrcode image [CHAR LIMIT=none]-->
|
||||||
|
<string name="audio_streams_qr_code_page_image_label">QR code</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- url for learning more about bluetooth audio sharing -->
|
<!-- url for learning more about bluetooth audio sharing -->
|
||||||
|
@@ -55,7 +55,7 @@ public class AudioStreamsQrCodeFragment extends InstrumentedFragment {
|
|||||||
@Override
|
@Override
|
||||||
public final View onCreateView(
|
public final View onCreateView(
|
||||||
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
return inflater.inflate(R.xml.bluetooth_audio_streams_qr_code, container, false);
|
return inflater.inflate(R.layout.bluetooth_audio_streams_qr_code, container, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user