Fix text view padding issue in EmptyTextSettings
Set the left and right padding of text view to 24dp. Impact pages: Apps & notifications > Special app access > Premium SMS access Apps & notifications > Special app access > VR helper services Fixes: 147901392 Test: visual Change-Id: I01aa7935462e4d16e56be71a8f1f0cbe9b8275f9
This commit is contained in:
@@ -430,4 +430,7 @@
|
||||
|
||||
<!-- Output switcher panel related dimensions -->
|
||||
<dimen name="output_switcher_slice_padding_top">12dp</dimen>
|
||||
|
||||
<!-- Text padding for EmptyTextSettings -->
|
||||
<dimen name="empty_text_padding">24dp</dimen>
|
||||
</resources>
|
||||
|
@@ -25,6 +25,7 @@ import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
|
||||
public abstract class EmptyTextSettings extends SettingsPreferenceFragment {
|
||||
@@ -36,6 +37,9 @@ public abstract class EmptyTextSettings extends SettingsPreferenceFragment {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
mEmpty = new TextView(getContext());
|
||||
mEmpty.setGravity(Gravity.CENTER);
|
||||
final int textPadding = getContext().getResources().getDimensionPixelSize(
|
||||
R.dimen.empty_text_padding);
|
||||
mEmpty.setPadding(textPadding, 0 /* top */, textPadding, 0 /* bottom */);
|
||||
TypedValue value = new TypedValue();
|
||||
getContext().getTheme().resolveAttribute(android.R.attr.textAppearanceMedium, value, true);
|
||||
mEmpty.setTextAppearance(value.resourceId);
|
||||
|
Reference in New Issue
Block a user