Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0279da90 authored by Tetiana Meronyk's avatar Tetiana Meronyk Committed by Android (Google) Code Review
Browse files

Merge "Make Add user dialog scrollable"

parents 2d054595 d5a3bce4
Loading
Loading
Loading
Loading
+55 −40
Original line number Diff line number Diff line
@@ -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"
@@ -57,3 +69,6 @@
            android:maxLength="100"/>

    </LinearLayout>

</ScrollView>
+6 −0
Original line number Diff line number Diff line
@@ -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>
+3 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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);

@@ -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) -> {