Merge "Correct Wifi Share UI margins and capitalization"
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
android:id="@+id/password"
|
android:id="@+id/password"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
@@ -162,7 +162,8 @@ public class WifiDppQrCodeGeneratorFragment extends WifiDppQrCodeBaseFragment {
|
|||||||
setQrCode();
|
setQrCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting ComponentName getNearbySharingComponent() {
|
@VisibleForTesting
|
||||||
|
ComponentName getNearbySharingComponent() {
|
||||||
String nearbyComponent = Settings.Secure.getString(
|
String nearbyComponent = Settings.Secure.getString(
|
||||||
getContext().getContentResolver(),
|
getContext().getContentResolver(),
|
||||||
Settings.Secure.NEARBY_SHARING_COMPONENT);
|
Settings.Secure.NEARBY_SHARING_COMPONENT);
|
||||||
@@ -221,7 +222,7 @@ public class WifiDppQrCodeGeneratorFragment extends WifiDppQrCodeBaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Button createActionButton(Drawable icon, CharSequence title, View.OnClickListener r) {
|
private Button createActionButton(Drawable icon, CharSequence title, View.OnClickListener r) {
|
||||||
Button b = (Button) LayoutInflater.from(getContext()).inflate(
|
final Button b = (Button) LayoutInflater.from(getContext()).inflate(
|
||||||
com.android.internal.R.layout.chooser_action_button, null);
|
com.android.internal.R.layout.chooser_action_button, null);
|
||||||
if (icon != null) {
|
if (icon != null) {
|
||||||
final int size = getResources()
|
final int size = getResources()
|
||||||
@@ -252,8 +253,10 @@ public class WifiDppQrCodeGeneratorFragment extends WifiDppQrCodeBaseFragment {
|
|||||||
Button createNearbyButton(Intent originalIntent, View.OnClickListener r) {
|
Button createNearbyButton(Intent originalIntent, View.OnClickListener r) {
|
||||||
final TargetInfo ti = getNearbySharingTarget(originalIntent);
|
final TargetInfo ti = getNearbySharingTarget(originalIntent);
|
||||||
if (ti == null) return null;
|
if (ti == null) return null;
|
||||||
|
final Button button = createActionButton(ti.getDisplayIcon(getContext()),
|
||||||
return createActionButton(ti.getDisplayIcon(getContext()), ti.getDisplayLabel(), r);
|
ti.getDisplayLabel(), r);
|
||||||
|
button.setAllCaps(false);
|
||||||
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setQrCode() {
|
private void setQrCode() {
|
||||||
|
Reference in New Issue
Block a user