Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e143f5e authored by Jeff Brown's avatar Jeff Brown
Browse files

First draft of wifi display settings UI.

All of the functionality is in place but the UI is
not fully polished yet.

Bug: 7178216
Change-Id: Id76843bff05cc71e5c02a31bc97c7070d58fff10
parent 99340f36
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@
    <uses-permission android:name="android.permission.COPY_PROTECTED_DATA" />
    <uses-permission android:name="android.permission.MANAGE_USERS" />
    <uses-permission android:name="android.permission.READ_PROFILE" />
    <uses-permission android:name="android.permission.CONFIGURE_WIFI_DISPLAY" />

    <application android:label="@string/settings_label"
            android:icon="@mipmap/ic_launcher_settings"
@@ -1226,7 +1227,18 @@
                android:value="com.android.settings.nfc.AndroidBeam" />
        </activity>


        <activity android:name="Settings$WifiDisplaySettingsActivity"
                android:label="@string/wifi_display_settings_title"
                android:taskAffinity="com.android.settings"
                android:parentActivityName="Settings$DisplaySettingsActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.settings.WIFI_DISPLAY_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.wfd.WifiDisplaySettings" />
        </activity>


        <!-- Development settings -->
+3 −5
Original line number Diff line number Diff line
@@ -18,19 +18,18 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    style="?android:attr/listSeparatorTextViewStyle"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    >
    android:orientation="horizontal">

    <!-- This text view has the style of the list separator text view without the background and padding. -->
    <TextView
        style="?android:attr/listSeparatorTextViewStyle"
        android:background="@null"
        android:paddingStart="16dip"
        android:id="@+android:id/title"
        android:paddingStart="0dp"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:layout_gravity="start|bottom"
        android:layout_gravity="start|center"
    />

    <ProgressBar
@@ -40,7 +39,6 @@
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_marginStart="16dip"
        android:layout_marginEnd="16dip"
        style="?android:attr/progressBarStyleSmallTitle"
        />

+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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="wrap_content"
    android:paddingStart="16dp"
    android:paddingEnd="16dp"
    android:orientation="vertical">

    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/wifi_display_options_name" />

    <EditText
            android:id="@+id/name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

</LinearLayout>
+43 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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="wrap_content"
    android:gravity="center_vertical">

    <!-- Divider -->
    <ImageView
        android:id="@+id/divider"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:src="@drawable/nav_divider"
        android:contentDescription="@null"
         />

    <!-- Details button -->
    <ImageView
        android:id="@+id/deviceDetails"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:padding="8dip"
        android:background="?android:attr/selectableItemBackground"
        android:src="@drawable/ic_bt_config"
        android:contentDescription="@string/wifi_display_details" />

</LinearLayout>
+46 −0
Original line number Diff line number Diff line
@@ -1153,6 +1153,52 @@
    <!-- Bluetooth settings.  Dock Setting Dialog - Remember setting and don't ask user again -->
    <string name="bluetooth_dock_settings_remember">Remember settings</string>

    <!-- Wifi Display settings. The title of the screen. [CHAR LIMIT=40] -->
    <string name="wifi_display_settings_title">Wireless display</string>
    <!-- Wifi Display settings. Text displayed when Wifi display is off and device list is empty [CHAR LIMIT=80]-->
    <string name="wifi_display_settings_empty_list_wifi_display_off">To see devices, turn wireless display on.</string>
    <!-- Wifi Display settings. Text displayed when Wifi Display is off and device list is empty [CHAR LIMIT=80]-->
    <string name="wifi_display_settings_empty_list_wifi_display_disabled">Wireless display is disabled because Wi-Fi is off.</string>
    <!-- Wifi Display settings. The title of the action button that initiates a search for nearby devices [CHAR LIMIT=20] -->
    <string name="wifi_display_search_for_devices">Search for displays</string>
    <!-- Wifi Display settings. The title of the action button while a search for nearby devices is in progress [CHAR LIMIT=20] -->
    <string name="wifi_display_searching_for_devices">Searching\u2026</string>
    <!-- Wifi Display settings. Text that appears when scanning for devices is finished and no nearby device was found [CHAR LIMIT=40]-->
    <string name="wifi_display_no_devices_found">No nearby wireless displays were found.</string>
    <!-- Wifi Display settings. The sub heading for devices which have already been paired with this device. [CHAR LIMIT=40] -->
    <string name="wifi_display_paired_devices">Paired displays</string>
    <!-- Wifi Display settings. The sub heading for available devices during and after scanning. [CHAR LIMIT=40] -->
    <string name="wifi_display_available_devices">Available devices</string>
    <!-- Wifi Display settings. The status summary for connecting devices. [CHAR LIMIT=40] -->
    <string name="wifi_display_status_connecting">Connecting</string>
    <!-- Wifi Display settings. The status summary for connected devices. [CHAR LIMIT=40] -->
    <string name="wifi_display_status_connected">Connected</string>
    <!-- Wifi Display settings. The status summary for available devices. [CHAR LIMIT=40] -->
    <string name="wifi_display_status_available">Available</string>
    <!-- Wifi Display settings. Image description for device details button. This opens the screen to rename, unpair, etc. a single device. -->
    <string name="wifi_display_details">Display settings</string>

    <!-- Wifi Display settings. Disconnect dialog.  The title of the dialog. [CHAR LIMIT=40] -->
    <string name="wifi_display_disconnect_title">Disconnect?</string>
    <!-- Wifi Display settings. Disconnect dialog.  Message for disconnecting from the display. [CHAR LIMIT=NONE] -->
    <string name="wifi_display_disconnect_text">This will end your connection with:&lt;br>&lt;b><xliff:g id="device_name">%1$s</xliff:g>&lt;/b></string>

    <!-- Wifi Display settings. Options dialog.  The title of the dialog. [CHAR LIMIT=40] -->
    <string name="wifi_display_options_title">Wireless display options</string>
    <!-- Wifi Display settings. Options dialog.  The forget button text. [CHAR LIMIT=20] -->
    <string name="wifi_display_options_forget">Forget</string>
    <!-- Wifi Display settings. Options dialog.  The done button text. [CHAR LIMIT=20] -->
    <string name="wifi_display_options_done">Done</string>
    <!-- Wifi Display settings. Options dialog.  The name label used when prompting the user to rename the display. [CHAR LIMIT=20] -->
    <string name="wifi_display_options_name">Name</string>

    <!-- Wifi Display settings. Summary shown in Display settings. Text used for 'On' state. [CHAR LIMIT=40] -->
    <string name="wifi_display_summary_on">On</string>
    <!-- Wifi Display settings. Summary shown in Display settings. Text used for 'Off' state. [CHAR LIMIT=40] -->
    <string name="wifi_display_summary_off">Off</string>
    <!-- Wifi Display settings. Summary shown in Display settings. Text used for 'Disabled' state. [CHAR LIMIT=40] -->
    <string name="wifi_display_summary_disabled">Disabled</string>

    <!-- NFC settings -->
    <!-- Used in the 1st-level settings screen to turn on NFC -->
    <string name="nfc_quick_toggle_title">NFC</string>
Loading