Merge "[WifiSettings] Refactor Wi-Fi required info"
This commit is contained in:
@@ -37,15 +37,6 @@
|
|||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/wifi_required_info"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="6dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:text="@string/wifi_required_info_text"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@android:id/list"
|
android:id="@android:id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -53,15 +53,6 @@
|
|||||||
android:elevation="@dimen/setup_wizard_card_elevation"
|
android:elevation="@dimen/setup_wizard_card_elevation"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/wifi_required_info"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="6dp"
|
|
||||||
android:text="@string/wifi_required_info_text"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@android:id/list"
|
android:id="@android:id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -51,15 +51,6 @@
|
|||||||
android:elevation="@dimen/setup_wizard_card_elevation"
|
android:elevation="@dimen/setup_wizard_card_elevation"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/wifi_required_info"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="6dp"
|
|
||||||
android:text="@string/wifi_required_info_text"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@android:id/list"
|
android:id="@android:id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -22,15 +22,6 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/wifi_required_info"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="6dip"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:text="@string/wifi_required_info_text"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<com.android.settings.widget.StickyHeaderListView
|
<com.android.settings.widget.StickyHeaderListView
|
||||||
android:id="@android:id/list"
|
android:id="@android:id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
27
res/layout/setup_wifi_required_info.xml
Normal file
27
res/layout/setup_wifi_required_info.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2015 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/wifi_required_info"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="@dimen/setup_wizard_margin_top"
|
||||||
|
android:paddingBottom="6dip"
|
||||||
|
android:paddingStart="@dimen/setup_wizard_margin_sides"
|
||||||
|
android:paddingEnd="@dimen/setup_wizard_margin_sides"
|
||||||
|
android:text="@string/wifi_required_info_text"
|
||||||
|
android:textAppearance="@style/TextAppearance.SetupWizardDescription" />
|
||||||
@@ -73,7 +73,9 @@ public class WifiSettingsForSetupWizard extends WifiSettings {
|
|||||||
|
|
||||||
final Intent intent = getActivity().getIntent();
|
final Intent intent = getActivity().getIntent();
|
||||||
if (intent.getBooleanExtra(EXTRA_SHOW_WIFI_REQUIRED_INFO, false)) {
|
if (intent.getBooleanExtra(EXTRA_SHOW_WIFI_REQUIRED_INFO, false)) {
|
||||||
view.findViewById(R.id.wifi_required_info).setVisibility(View.VISIBLE);
|
final View requiredInfo =
|
||||||
|
inflater.inflate(R.layout.setup_wifi_required_info, list, false);
|
||||||
|
list.addHeaderView(requiredInfo, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
|
|||||||
Reference in New Issue
Block a user