我如何安排我的androidUI实现一个UI原型设计

How do I arrange my android UI to realize a UI prototype design

一位 UI 设计师已经完成了设计和原型,我正试图在代码中重现。我有一些东西,但我想知道如何使我的输入小部件看起来与原型中输入的激活码完全一样,以及如何将其容器化,使其具有覆盖在父级黑色背景上的白色背景。

屏幕设计在这里@https://imagebin.ca/v/3tpl23ZiTWok

我目前拥有的 UI 的代码是:

Activate Profile Screen

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="media.client.clientmediaandroid.activity.activateprofile.ActivateProfileActivity">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar_activateprofile"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@android:color/white"
        android:elevation="4dp"
        android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

    <TextView
        android:id="@+id/textview_activateprofile_title"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:layout_marginBottom="24dp"
        android:gravity="center"
        android:text="Activate Profile"
        android:textSize="24sp"
        app:layout_constraintTop_toBottomOf="@id/toolbar_activateprofile"/>

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/scrollview_activateprofile"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:fitsSystemWindows="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/textview_activateprofile_title">

        <LinearLayout
            android:layout_width="368dp"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingLeft="24dp"
            android:paddingRight="24dp"
            android:paddingTop="56dp"
            tools:layout_editor_absoluteX="8dp"
            tools:layout_editor_absoluteY="257dp">


            <TextView
                android:id="@+id/textview_activateprofile_prompt"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="24dp"
                android:gravity="center"
                android:text="Type in the code that was sent to your phone"
                android:textSize="16sp" />


            <android.support.design.widget.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:layout_marginTop="8dp">

                <EditText
                    android:id="@+id/edittext_activateprofile_code"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="Code"
                    android:inputType="number|numberPassword" />
            </android.support.design.widget.TextInputLayout>

            <ProgressBar
                android:id="@+id/progressbar_activateprofile_progress"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:visibility="gone" />

        <!-- Activate Button -->
        <android.support.v7.widget.AppCompatButton
            android:id="@+id/button_activateprofile_activate"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="24dp"
            android:layout_marginTop="24dp"
            android:padding="12dp"
            android:text="Activate" />

        </LinearLayout>

    </ScrollView>




</android.support.constraint.ConstraintLayout>

我将不胜感激。

非常感谢。

我已经能够通过从布局中删除 ScrollView 来实现最接近的功能设计。新布局如下图:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/black"
    tools:context="media.client.clientmediaandroid.activity.activateprofile.ActivateProfileActivity">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar_activateprofile"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/clientPrimaryBlue"
        android:elevation="4dp"
        android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:titleTextColor="@android:color/white" />

    <TextView
        android:id="@+id/textview_activateprofile_title"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:gravity="center"
        android:text="Activate Profile"
        android:textColor="@color/highlightColor"
        android:textSize="24sp"
        app:layout_constraintTop_toBottomOf="@id/toolbar_activateprofile" />


    <LinearLayout
        android:layout_width="368dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="20dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="20dp"
        android:orientation="vertical"
        android:paddingLeft="24dp"
        android:paddingRight="24dp"
        android:paddingTop="56dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textview_activateprofile_title"
        app:layout_constraintVertical_bias="0.0">


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/layout_bg"
            android:orientation="vertical"
            android:paddingLeft="24dp"
            android:paddingRight="24dp"
            android:paddingTop="56dp">


            <TextView
                android:id="@+id/textview_activateprofile_prompt"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="24dp"
                android:gravity="center"
                android:text="Type in the code that was sent to your phone"
                android:textSize="16sp" />


            <android.support.design.widget.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:layout_marginTop="8dp"
                android:textColorHint="@color/clientPrimaryBlue">

                <EditText
                    android:id="@+id/edittext_activateprofile_code"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="Code"
                    android:inputType="number"
                    android:theme="@style/EditTextTheme"/>
            </android.support.design.widget.TextInputLayout>
        </LinearLayout>


        <ProgressBar
            android:id="@+id/progressbar_activateprofile_progress"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:backgroundTint="@color/clientPrimaryBlue"
            android:gravity="center"
            android:visibility="gone" />

        <!-- Activate Button -->
        <android.support.v7.widget.AppCompatButton
            android:id="@+id/button_activateprofile_activate"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="24dp"
            android:layout_marginTop="24dp"
            android:background="@drawable/button_app_bg"
            android:padding="12dp"
            android:text="Activate"
            android:textColor="@android:color/white" />

    </LinearLayout>


</android.support.constraint.ConstraintLayout>

我在 iOS 应用程序上工作的同事通过创建自定义控件实现了代码输入控件。我稍后会研究这个。

非常感谢。