Advertisement
Hasbi_Assidiqqi

Tugas2-Muhammad Hasbi Assidiqqi

Mar 22nd, 2021 (edited)
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 14.32 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    android:scrollbars="none"
  8.    app:layout_behavior="@string/appbar_scrolling_view_behavior"
  9.    tools:context=".MainActivity">
  10.  
  11.     <LinearLayout
  12.        android:layout_width="match_parent"
  13.        android:layout_height="wrap_content"
  14.        android:orientation="vertical">
  15.  
  16.         <LinearLayout
  17.            android:layout_width="match_parent"
  18.            android:layout_height="200dp"
  19.            android:background="@drawable/img_top"
  20.            android:orientation="vertical">
  21.  
  22.             <com.google.android.material.appbar.AppBarLayout
  23.                android:layout_width="match_parent"
  24.                android:layout_height="wrap_content"
  25.                android:background="@android:color/transparent">
  26.  
  27.                 <com.google.android.material.appbar.MaterialToolbar
  28.                    android:id="@+id/toolbar"
  29.                    android:layout_width="match_parent"
  30.                    android:layout_height="?attr/actionBarSize"
  31.                    app:menu="@menu/menu"
  32.                    app:navigationIcon="@drawable/ic_back" />
  33.  
  34.             </com.google.android.material.appbar.AppBarLayout>
  35.  
  36.             <TextView
  37.                android:layout_width="wrap_content"
  38.                android:layout_height="wrap_content"
  39.                android:layout_marginStart="24dp"
  40.                android:layout_marginTop="4dp"
  41.                android:text="@string/register"
  42.                android:textColor="@color/white"
  43.                android:textSize="32sp"
  44.                android:textStyle="bold" />
  45.  
  46.             <TextView
  47.                android:layout_width="wrap_content"
  48.                android:layout_height="wrap_content"
  49.                android:layout_marginStart="24dp"
  50.                android:text="@string/second_slogan"
  51.                android:textColor="@color/white" />
  52.  
  53.         </LinearLayout>
  54.  
  55.         <RelativeLayout
  56.            android:layout_width="match_parent"
  57.            android:layout_height="wrap_content"
  58.            android:layout_marginTop="@dimen/margin"
  59.            android:gravity="center">
  60.  
  61.             <de.hdodenhof.circleimageview.CircleImageView
  62.                android:id="@+id/img_avatar"
  63.                android:layout_width="150dp"
  64.                android:layout_height="150dp"
  65.                android:scaleType="centerCrop"
  66.                android:src="@drawable/img_avatar" />
  67.  
  68.             <Button
  69.                android:id="@+id/btn_add_avatar"
  70.                android:layout_width="50dp"
  71.                android:layout_height="50dp"
  72.                android:layout_alignParentBottom="true"
  73.                android:layout_marginStart="-25dp"
  74.                android:layout_toEndOf="@+id/img_avatar"
  75.                android:background="@drawable/ic_add" />
  76.  
  77.  
  78.         </RelativeLayout>
  79.  
  80.         <com.google.android.material.textfield.TextInputLayout
  81.            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
  82.            android:layout_width="match_parent"
  83.            android:layout_height="wrap_content"
  84.            android:layout_marginStart="@dimen/margin"
  85.            android:layout_marginTop="12dp"
  86.            android:layout_marginEnd="@dimen/margin"
  87.            android:textColorHint="@color/black"
  88.            app:boxCornerRadiusBottomEnd="@dimen/roundedBox"
  89.            app:boxCornerRadiusBottomStart="@dimen/roundedBox"
  90.            app:boxCornerRadiusTopEnd="@dimen/roundedBox"
  91.            app:boxCornerRadiusTopStart="@dimen/roundedBox"
  92.            app:endIconMode="clear_text"
  93.            app:startIconDrawable="@drawable/ic_username"
  94.            app:startIconTint="@color/black">
  95.  
  96.             <com.google.android.material.textfield.TextInputEditText
  97.                android:id="@+id/edt_username"
  98.                android:layout_width="match_parent"
  99.                android:layout_height="wrap_content"
  100.                android:ellipsize="end"
  101.                android:hint="@string/username"
  102.                android:inputType="text"
  103.                android:maxLines="1" />
  104.  
  105.         </com.google.android.material.textfield.TextInputLayout>
  106.  
  107.         <com.google.android.material.textfield.TextInputLayout
  108.            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
  109.            android:layout_width="match_parent"
  110.            android:layout_height="wrap_content"
  111.            android:layout_marginStart="@dimen/margin"
  112.            android:layout_marginTop="12dp"
  113.            android:layout_marginEnd="@dimen/margin"
  114.            android:textColorHint="@color/black"
  115.            app:boxCornerRadiusBottomEnd="@dimen/roundedBox"
  116.            app:boxCornerRadiusBottomStart="@dimen/roundedBox"
  117.            app:boxCornerRadiusTopEnd="@dimen/roundedBox"
  118.            app:boxCornerRadiusTopStart="@dimen/roundedBox"
  119.            app:endIconMode="clear_text"
  120.            app:startIconDrawable="@drawable/ic_email"
  121.            app:startIconTint="@color/black">
  122.  
  123.             <com.google.android.material.textfield.TextInputEditText
  124.                android:id="@+id/edt_email"
  125.                android:layout_width="match_parent"
  126.                android:layout_height="wrap_content"
  127.                android:ellipsize="end"
  128.                android:hint="@string/email"
  129.                android:inputType="textEmailAddress"
  130.                android:maxLines="1" />
  131.  
  132.         </com.google.android.material.textfield.TextInputLayout>
  133.  
  134.         <com.google.android.material.textfield.TextInputLayout
  135.            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
  136.            android:layout_width="match_parent"
  137.            android:layout_height="wrap_content"
  138.            android:layout_marginStart="@dimen/margin"
  139.            android:layout_marginTop="12dp"
  140.            android:layout_marginEnd="@dimen/margin"
  141.            android:textColorHint="@color/black"
  142.            app:boxCornerRadiusBottomEnd="@dimen/roundedBox"
  143.            app:boxCornerRadiusBottomStart="@dimen/roundedBox"
  144.            app:boxCornerRadiusTopEnd="@dimen/roundedBox"
  145.            app:boxCornerRadiusTopStart="@dimen/roundedBox"
  146.            app:endIconMode="clear_text"
  147.            app:startIconDrawable="@drawable/ic_phone"
  148.            app:startIconTint="@color/black">
  149.  
  150.             <com.google.android.material.textfield.TextInputEditText
  151.                android:id="@+id/edt_phone_number"
  152.                android:layout_width="match_parent"
  153.                android:layout_height="wrap_content"
  154.                android:ellipsize="end"
  155.                android:hint="@string/phone_number"
  156.                android:inputType="phone"
  157.                android:maxLines="1" />
  158.  
  159.         </com.google.android.material.textfield.TextInputLayout>
  160.  
  161.         <com.google.android.material.textfield.TextInputLayout
  162.            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
  163.            android:layout_width="match_parent"
  164.            android:layout_height="wrap_content"
  165.            android:layout_marginStart="@dimen/margin"
  166.            android:layout_marginTop="12dp"
  167.            android:layout_marginEnd="@dimen/margin"
  168.            android:textColorHint="@color/black"
  169.            app:boxCornerRadiusBottomEnd="@dimen/roundedBox"
  170.            app:boxCornerRadiusBottomStart="@dimen/roundedBox"
  171.            app:boxCornerRadiusTopEnd="@dimen/roundedBox"
  172.            app:boxCornerRadiusTopStart="@dimen/roundedBox"
  173.            app:passwordToggleEnabled="true"
  174.            app:startIconDrawable="@drawable/ic_password"
  175.            app:startIconTint="@color/black">
  176.  
  177.             <com.google.android.material.textfield.TextInputEditText
  178.                android:id="@+id/edt_password"
  179.                android:layout_width="match_parent"
  180.                android:layout_height="wrap_content"
  181.                android:ellipsize="end"
  182.                android:hint="@string/password"
  183.                android:inputType="textPassword"
  184.                android:maxLines="1" />
  185.  
  186.         </com.google.android.material.textfield.TextInputLayout>
  187.  
  188.         <com.google.android.material.textfield.TextInputLayout
  189.            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
  190.            android:layout_width="match_parent"
  191.            android:layout_height="wrap_content"
  192.            android:layout_marginStart="@dimen/margin"
  193.            android:layout_marginTop="12dp"
  194.            android:layout_marginEnd="@dimen/margin"
  195.            android:textColorHint="@color/black"
  196.            app:boxCornerRadiusBottomEnd="@dimen/roundedBox"
  197.            app:boxCornerRadiusBottomStart="@dimen/roundedBox"
  198.            app:boxCornerRadiusTopEnd="@dimen/roundedBox"
  199.            app:boxCornerRadiusTopStart="@dimen/roundedBox"
  200.            app:passwordToggleEnabled="true"
  201.            app:startIconDrawable="@drawable/ic_password"
  202.            app:startIconTint="@color/black">
  203.  
  204.             <com.google.android.material.textfield.TextInputEditText
  205.                android:id="@+id/edt_confirm_password"
  206.                android:layout_width="match_parent"
  207.                android:layout_height="wrap_content"
  208.                android:ellipsize="end"
  209.                android:hint="@string/confirm_password"
  210.                android:inputType="textPassword"
  211.                android:maxLines="1" />
  212.  
  213.         </com.google.android.material.textfield.TextInputLayout>
  214.  
  215.         <RadioGroup
  216.            android:layout_width="match_parent"
  217.            android:layout_height="wrap_content"
  218.            android:layout_marginTop="12dp"
  219.            android:gravity="center"
  220.            android:orientation="horizontal">
  221.  
  222.             <RadioButton
  223.                android:id="@+id/rb_male"
  224.                android:layout_width="wrap_content"
  225.                android:layout_height="wrap_content"
  226.                android:text="@string/male" />
  227.  
  228.             <RadioButton
  229.                android:id="@+id/rb_female"
  230.                android:layout_width="wrap_content"
  231.                android:layout_height="wrap_content"
  232.                android:layout_marginStart="24dp"
  233.                android:text="@string/female" />
  234.  
  235.         </RadioGroup>
  236.  
  237.         <Button
  238.            android:id="@+id/btn_sign_up"
  239.            android:layout_width="match_parent"
  240.            android:layout_height="50dp"
  241.            android:layout_marginStart="@dimen/margin"
  242.            android:layout_marginTop="@dimen/margin"
  243.            android:layout_marginEnd="@dimen/margin"
  244.            android:background="@drawable/rounded_button"
  245.            android:text="@string/sign_up"
  246.            android:textSize="22sp"
  247.            android:textStyle="bold" />
  248.  
  249.         <LinearLayout
  250.            android:layout_width="match_parent"
  251.            android:layout_height="wrap_content"
  252.            android:layout_marginTop="8dp"
  253.            android:gravity="center"
  254.            android:orientation="horizontal">
  255.  
  256.             <TextView
  257.                android:layout_width="wrap_content"
  258.                android:layout_height="wrap_content"
  259.                android:text="@string/already_have_an_account"
  260.                android:textSize="16sp" />
  261.  
  262.             <Button
  263.                android:id="@+id/tv_sign_in"
  264.                style="@style/Widget.MaterialComponents.Button.TextButton"
  265.                android:layout_width="wrap_content"
  266.                android:layout_height="wrap_content"
  267.                android:text="@string/sign_in"
  268.                android:textAllCaps="false"
  269.                android:textColor="@color/purple_200"
  270.                android:textSize="16sp"
  271.                android:textStyle="bold" />
  272.  
  273.         </LinearLayout>
  274.  
  275.         <LinearLayout
  276.            android:layout_width="match_parent"
  277.            android:layout_height="wrap_content"
  278.            android:layout_marginStart="@dimen/margin"
  279.            android:layout_marginTop="44dp"
  280.            android:layout_marginEnd="@dimen/margin"
  281.            android:gravity="center"
  282.            android:orientation="horizontal">
  283.  
  284.             <View
  285.                android:layout_width="wrap_content"
  286.                android:layout_height="1dp"
  287.                android:layout_weight="1"
  288.                android:background="#BBBBBB" />
  289.  
  290.             <TextView
  291.                android:layout_width="wrap_content"
  292.                android:layout_height="wrap_content"
  293.                android:layout_gravity="center"
  294.                android:layout_marginStart="4dp"
  295.                android:layout_marginEnd="4dp"
  296.                android:text="@string/or_sign_up_with"
  297.                android:textSize="16sp" />
  298.  
  299.             <View
  300.                android:layout_width="wrap_content"
  301.                android:layout_height="1dp"
  302.                android:layout_weight="1"
  303.                android:background="#BBBBBB" />
  304.  
  305.         </LinearLayout>
  306.  
  307.         <LinearLayout
  308.            android:layout_width="match_parent"
  309.            android:layout_height="wrap_content"
  310.            android:layout_marginTop="8dp"
  311.            android:layout_marginBottom="44dp"
  312.            android:gravity="center"
  313.            android:orientation="horizontal">
  314.  
  315.             <ImageButton
  316.                android:id="@+id/btn_google"
  317.                android:layout_width="40dp"
  318.                android:layout_height="40dp"
  319.                android:layout_marginEnd="12dp"
  320.                android:background="@drawable/ic_google"
  321.                android:contentDescription="@string/desc_image" />
  322.  
  323.             <ImageButton
  324.                android:id="@+id/btn_fb"
  325.                android:layout_width="40dp"
  326.                android:layout_height="40dp"
  327.                android:layout_marginStart="12dp"
  328.                android:layout_marginEnd="12dp"
  329.                android:background="@drawable/ic_facebook"
  330.                android:contentDescription="@string/desc_image" />
  331.  
  332.             <ImageButton
  333.                android:id="@+id/btn_twitter"
  334.                android:layout_width="40dp"
  335.                android:layout_height="40dp"
  336.                android:layout_marginStart="12dp"
  337.                android:background="@drawable/ic_twitter"
  338.                android:contentDescription="@string/desc_image" />
  339.  
  340.         </LinearLayout>
  341.  
  342.     </LinearLayout>
  343.  
  344. </ScrollView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement