Loading packages/SettingsLib/res/layout/edit_user_info_dialog_content.xml +55 −40 Original line number Diff line number Diff line Loading @@ -13,14 +13,26 @@ See the License for the specific language governing permissions and limitations under the License. --> <LinearLayout <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:baselineAligned="false" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/user_info_scroll" android:padding="16dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:baselineAligned="false" android:orientation="vertical"> <TextView android:id="@+id/user_info_title" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/EditUserDialogTitle" android:text="@string/user_info_settings_title" android:textDirection="locale"/> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" Loading Loading @@ -57,3 +69,6 @@ android:maxLength="100"/> </LinearLayout> </ScrollView> packages/SettingsLib/res/values/styles.xml +6 −0 Original line number Diff line number Diff line Loading @@ -77,4 +77,10 @@ <item name="android:textSize">@dimen/broadcast_dialog_btn_text_size</item> </style> <style name="EditUserDialogTitle" parent="@android:TextAppearance.DeviceDefault.Headline"> <item name="android:textSize">@dimen/broadcast_dialog_title_text_size</item> <item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textDirection">locale</item> <item name="android:ellipsize">end</item> </style> </resources> packages/SettingsLib/src/com/android/settingslib/users/EditUserInfoController.java +3 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.view.View; import android.view.WindowManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.ScrollView; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; Loading Loading @@ -159,7 +160,8 @@ public class EditUserInfoController { userPhotoView); } } ScrollView scrollView = content.findViewById(R.id.user_info_scroll); scrollView.setClipToOutline(true); mEditUserInfoDialog = buildDialog(activity, content, userNameView, oldUserIcon, defaultUserName, title, successCallback, cancelCallback); Loading @@ -182,7 +184,6 @@ public class EditUserInfoController { @Nullable Drawable oldUserIcon, String defaultUserName, String title, BiConsumer<String, Drawable> successCallback, Runnable cancelCallback) { return new AlertDialog.Builder(activity) .setTitle(title) .setView(content) .setCancelable(true) .setPositiveButton(android.R.string.ok, (dialog, which) -> { Loading Loading
packages/SettingsLib/res/layout/edit_user_info_dialog_content.xml +55 −40 Original line number Diff line number Diff line Loading @@ -13,14 +13,26 @@ See the License for the specific language governing permissions and limitations under the License. --> <LinearLayout <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:baselineAligned="false" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/user_info_scroll" android:padding="16dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:baselineAligned="false" android:orientation="vertical"> <TextView android:id="@+id/user_info_title" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/EditUserDialogTitle" android:text="@string/user_info_settings_title" android:textDirection="locale"/> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" Loading Loading @@ -57,3 +69,6 @@ android:maxLength="100"/> </LinearLayout> </ScrollView>
packages/SettingsLib/res/values/styles.xml +6 −0 Original line number Diff line number Diff line Loading @@ -77,4 +77,10 @@ <item name="android:textSize">@dimen/broadcast_dialog_btn_text_size</item> </style> <style name="EditUserDialogTitle" parent="@android:TextAppearance.DeviceDefault.Headline"> <item name="android:textSize">@dimen/broadcast_dialog_title_text_size</item> <item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textDirection">locale</item> <item name="android:ellipsize">end</item> </style> </resources>
packages/SettingsLib/src/com/android/settingslib/users/EditUserInfoController.java +3 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.view.View; import android.view.WindowManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.ScrollView; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; Loading Loading @@ -159,7 +160,8 @@ public class EditUserInfoController { userPhotoView); } } ScrollView scrollView = content.findViewById(R.id.user_info_scroll); scrollView.setClipToOutline(true); mEditUserInfoDialog = buildDialog(activity, content, userNameView, oldUserIcon, defaultUserName, title, successCallback, cancelCallback); Loading @@ -182,7 +184,6 @@ public class EditUserInfoController { @Nullable Drawable oldUserIcon, String defaultUserName, String title, BiConsumer<String, Drawable> successCallback, Runnable cancelCallback) { return new AlertDialog.Builder(activity) .setTitle(title) .setView(content) .setCancelable(true) .setPositiveButton(android.R.string.ok, (dialog, which) -> { Loading