summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Martinz <eviscerationls@gmail.com>2016-01-27 22:26:11 +0100
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-01-31 13:52:07 -0800
commitf676d3c12dca9afc36657fc68d6b6d06f4007e0e (patch)
tree1095bacd012ab52f7dc243c76a61622eee308061
parentc5ff8dfbac6136ebee6672a6b0729b320937ab5c (diff)
downloadpackages_apps_Settings-f676d3c12dca9afc36657fc68d6b6d06f4007e0e.zip
packages_apps_Settings-f676d3c12dca9afc36657fc68d6b6d06f4007e0e.tar.gz
packages_apps_Settings-f676d3c12dca9afc36657fc68d6b6d06f4007e0e.tar.bz2
Bluetooth/Wifi: center empty view and set textAppearance to medium
* does not look weird anymore when toggling bluetooth or wifi Change-Id: Ibbf375e241f091bc27b76c273598da9fc0d67ed9 Signed-off-by: Alexander Martinz <eviscerationls@gmail.com>
-rw-r--r--res/layout/preference_list_fragment.xml3
-rw-r--r--src/com/android/settings/bluetooth/BluetoothSettings.java6
-rw-r--r--src/com/android/settings/wifi/WifiSettings.java7
3 files changed, 2 insertions, 14 deletions
diff --git a/res/layout/preference_list_fragment.xml b/res/layout/preference_list_fragment.xml
index 489baa1..05ca7ec 100644
--- a/res/layout/preference_list_fragment.xml
+++ b/res/layout/preference_list_fragment.xml
@@ -68,7 +68,8 @@
android:layout_height="match_parent"
android:padding="@*android:dimen/preference_fragment_padding_side"
android:gravity="center"
- android:visibility="gone" />
+ android:visibility="gone"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
<RelativeLayout android:id="@+id/button_bar"
android:layout_height="wrap_content"
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index d63dbe4..be12e79 100644
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -35,7 +35,6 @@ import android.preference.PreferenceCategory;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.provider.Settings;
-import android.text.Spannable;
import android.text.style.TextAppearanceSpan;
import android.util.DisplayMetrics;
import android.util.Log;
@@ -143,7 +142,6 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
mEmptyView = (TextView) getView().findViewById(android.R.id.empty);
getListView().setEmptyView(mEmptyView);
- mEmptyView.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
final SettingsActivity activity = (SettingsActivity) getActivity();
mSwitchBar = activity.getSwitchBar();
@@ -477,10 +475,6 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
});
}
getPreferenceScreen().removeAll();
- Spannable boldSpan = (Spannable) mEmptyView.getText();
- boldSpan.setSpan(
- new TextAppearanceSpan(getActivity(), android.R.style.TextAppearance_Medium), 0,
- briefText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
@Override
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 18eb6d9..e83889c 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -52,7 +52,6 @@ import android.os.UserManager;
import android.preference.Preference;
import android.preference.PreferenceScreen;
import android.provider.Settings;
-import android.text.Spannable;
import android.text.style.TextAppearanceSpan;
import android.util.Log;
import android.view.ContextMenu;
@@ -720,7 +719,6 @@ public class WifiSettings extends RestrictedSettingsFragment
protected TextView initEmptyView() {
TextView emptyView = (TextView) getActivity().findViewById(android.R.id.empty);
- emptyView.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
getListView().setEmptyView(emptyView);
return emptyView;
}
@@ -759,11 +757,6 @@ public class WifiSettings extends RestrictedSettingsFragment
}
});
}
- // Embolden and enlarge the brief description anyway.
- Spannable boldSpan = (Spannable) mEmptyView.getText();
- boldSpan.setSpan(
- new TextAppearanceSpan(getActivity(), android.R.style.TextAppearance_Medium), 0,
- briefText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
getPreferenceScreen().removeAll();
}