forked from oppia/oppia-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* done ui corrections * fixed issues. * Update pin_password_activity.xml * updated color * updated icon * updated pinview shadow * updated icon color * changed shadow * updated mock color * fix * Update pin_password_activity.xml * updated nit change. * Update pin_password_activity.xml * removed fixed width * fixed dimen file changes * Update dimens.xml
- Loading branch information
1 parent
9bbd10b
commit efd93c9
Showing
8 changed files
with
171 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
<vector android:height="50dp" android:viewportHeight="24" | ||
android:viewportWidth="24" android:width="50dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#008577" android:pathData="M12,6.5c3.8,0 7.2,2.1 8.8,5.5c-1.6,3.4 -5,5.5 -8.8,5.5S4.8,15.4 3.2,12C4.8,8.6 8.2,6.5 12,6.5M12,4.5C7,4.5 2.7,7.6 1,12c1.7,4.4 6,7.5 11,7.5s9.3,-3.1 11,-7.5C21.3,7.6 17,4.5 12,4.5zM12,7.5c-2.5,0 -4.5,2 -4.5,4.5s2,4.5 4.5,4.5s4.5,-2 4.5,-4.5S14.5,7.5 12,7.5z"/> | ||
<path android:fillColor="#00000000" | ||
android:pathData="M4,3.9L20,20.1" android:strokeColor="#008577" | ||
android:strokeLineCap="round" android:strokeWidth="2"/> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="#00645C" | ||
android:pathData="M12,6.5c3.8,0 7.2,2.1 8.8,5.5c-1.6,3.4 -5,5.5 -8.8,5.5S4.8,15.4 3.2,12C4.8,8.6 8.2,6.5 12,6.5M12,4.5C7,4.5 2.7,7.6 1,12c1.7,4.4 6,7.5 11,7.5s9.3,-3.1 11,-7.5C21.3,7.6 17,4.5 12,4.5zM12,7.5c-2.5,0 -4.5,2 -4.5,4.5s2,4.5 4.5,4.5s4.5,-2 4.5,-4.5S14.5,7.5 12,7.5z"/> | ||
<path | ||
android:pathData="M4,3.9L20,20.1" | ||
android:strokeWidth="2" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#00645C" | ||
android:strokeLineCap="round"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
<vector android:height="50dp" android:viewportHeight="24" | ||
android:viewportWidth="24" android:width="50dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#008577" android:pathData="M12,6.5c3.8,0 7.2,2.1 8.8,5.5c-1.6,3.4 -5,5.5 -8.8,5.5S4.8,15.4 3.2,12C4.8,8.6 8.2,6.5 12,6.5M12,4.5C7,4.5 2.7,7.6 1,12c1.7,4.4 6,7.5 11,7.5s9.3,-3.1 11,-7.5C21.3,7.6 17,4.5 12,4.5zM12,7.5c-2.5,0 -4.5,2 -4.5,4.5s2,4.5 4.5,4.5s4.5,-2 4.5,-4.5S14.5,7.5 12,7.5z"/> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="#00645C" | ||
android:pathData="M12,6.5c3.8,0 7.2,2.1 8.8,5.5c-1.6,3.4 -5,5.5 -8.8,5.5S4.8,15.4 3.2,12C4.8,8.6 8.2,6.5 12,6.5M12,4.5C7,4.5 2.7,7.6 1,12c1.7,4.4 6,7.5 11,7.5s9.3,-3.1 11,-7.5C21.3,7.6 17,4.5 12,4.5zM12,7.5c-2.5,0 -4.5,2 -4.5,4.5s2,4.5 4.5,4.5s4.5,-2 4.5,-4.5S14.5,7.5 12,7.5z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<shape> | ||
<corners android:radius="6dp" /> | ||
<solid android:color="@color/mid_grey_03" /> | ||
<padding | ||
android:bottom="1dp" | ||
android:left="1dp" | ||
android:right="1dp" | ||
android:top="1dp" /> | ||
</shape> | ||
</item> | ||
<item> | ||
<shape> | ||
<corners android:radius="4dp" /> | ||
<solid android:color="@color/mid_grey_03" /> | ||
<padding | ||
android:bottom="1dp" | ||
android:left="1dp" | ||
android:right="1dp" | ||
android:top="1dp" /> | ||
</shape> | ||
</item> | ||
<item> | ||
<shape> | ||
<corners android:radius="4dp" /> | ||
<solid android:color="@color/mid_grey_03" /> | ||
<padding | ||
android:bottom="1dp" | ||
android:left="1dp" | ||
android:right="1dp" | ||
android:top="1dp" /> | ||
</shape> | ||
</item> <item> | ||
<shape> | ||
<corners android:radius="4dp" /> | ||
<solid android:color="@color/mid_grey_05" /> | ||
<padding | ||
android:bottom="1dp" | ||
android:left="1dp" | ||
android:right="1dp" | ||
android:top="1dp" /> | ||
</shape> | ||
</item> | ||
<item> | ||
<shape> | ||
<corners android:radius="4dp" /> | ||
<solid android:color="@color/mid_grey_05" /> | ||
<padding | ||
android:bottom="1dp" | ||
android:left="1dp" | ||
android:right="1dp" | ||
android:top="1dp" /> | ||
</shape> | ||
</item> | ||
<item> | ||
<shape> | ||
<corners android:radius="2dp" /> | ||
<solid android:color="@color/white" /> | ||
</shape> | ||
</item> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,135 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<data> | ||
<import type="android.text.InputType"/> | ||
|
||
<import type="android.text.InputType" /> | ||
|
||
<variable | ||
name="viewModel" | ||
type="org.oppia.app.profile.PinPasswordViewModel" /> | ||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/pinPasswordBackground"> | ||
android:background="@color/oppiaLightGreen"> | ||
|
||
<TextView | ||
android:id="@+id/hello_text" | ||
android:id="@+id/hello_text_view" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:lines="1" | ||
android:layout_marginStart="28dp" | ||
android:layout_marginTop="96dp" | ||
android:layout_marginEnd="28dp" | ||
android:fontFamily="sans-serif" | ||
android:gravity="center_horizontal" | ||
android:lines="1" | ||
android:text="@{String.format(@string/pin_password_hello, viewModel.profile.name)}" | ||
android:textColor="@color/black" | ||
android:textSize="28sp" | ||
android:layout_marginTop="40dp" | ||
app:layout_constraintTop_toTopOf="parent" | ||
android:textColor="@color/oppiaPrimaryText" | ||
android:textSize="24sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent"/> | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/enter_text" | ||
android:id="@+id/enter_text_view" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:paddingStart="@dimen/enter_text_view_padding_start" | ||
android:layout_marginTop="8dp" | ||
android:paddingEnd="@dimen/enter_text_view_padding_end" | ||
android:fontFamily="sans-serif" | ||
android:gravity="center_horizontal" | ||
android:text="@{viewModel.profile.isAdmin ? @string/pin_password_admin_enter : @string/pin_password_user_enter}" | ||
android:textColor="@color/black" | ||
android:textSize="24sp" | ||
android:layout_marginTop="12dp" | ||
android:paddingBottom="12dp" | ||
app:layout_constraintTop_toBottomOf="@+id/hello_text" | ||
android:textColor="@color/oppiaPrimaryText" | ||
android:textSize="18sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent"/> | ||
app:layout_constraintTop_toBottomOf="@+id/hello_text_view" /> | ||
|
||
<TextView | ||
android:id="@+id/error_text" | ||
android:id="@+id/pin_password_error_text_view" | ||
android:layout_width="wrap_content" | ||
android:layout_height="24dp" | ||
android:layout_height="wrap_content" | ||
android:text="@{viewModel.showError ? @string/pin_password_incorrect_pin : null}" | ||
android:textColor="@color/red" | ||
android:textSize="20sp" | ||
app:layout_constraintTop_toBottomOf="@+id/enter_text" | ||
android:textColor="@color/oppiaBrown" | ||
android:textSize="16sp" | ||
android:layout_marginTop="24dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent"/> | ||
app:layout_constraintTop_toBottomOf="@+id/enter_text_view" /> | ||
|
||
<com.chaos.view.PinView | ||
android:id="@+id/input_pin" | ||
style="@style/PinWidget.PinView" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:cursorVisible="true" | ||
android:inputType="@{viewModel.showPassword ? InputType.TYPE_CLASS_NUMBER : (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD)}" | ||
android:padding="10dp" | ||
android:itemBackground="@color/white" | ||
android:textColor="@color/black" | ||
android:textSize="22sp" | ||
android:textStyle="bold" | ||
android:layout_marginTop="10dp" | ||
app:cursorColor="@color/black" | ||
android:textColor="@color/oppiaPrimaryText" | ||
android:textSize="20sp" | ||
android:fontFamily="sans-serif" | ||
android:layout_marginTop="8dp" | ||
app:cursorColor="@color/oppiaPrimaryText" | ||
app:cursorWidth="2dp" | ||
app:hideLineWhenFilled="false" | ||
app:itemCount="@{viewModel.profile.pin.length()}" | ||
app:itemHeight="48dp" | ||
app:itemRadius="4dp" | ||
app:itemRadius="2dp" | ||
app:itemSpacing="8dp" | ||
app:itemWidth="28dp" | ||
app:lineColor="@color/grey" | ||
app:lineColor="@color/avatarBorder" | ||
app:lineWidth="1dp" | ||
app:viewType="rectangle" | ||
app:layout_constraintTop_toBottomOf="@+id/error_text" | ||
app:layout_constraintTop_toBottomOf="@+id/pin_password_error_text_view" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent"/> | ||
|
||
<TextView | ||
android:id="@+id/forgot_pin" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="10dp" | ||
android:minHeight="48dp" | ||
android:paddingTop="12dp" | ||
android:fontFamily="sans-serif" | ||
android:text="@string/pin_password_forgot_pin" | ||
android:textAllCaps="true" | ||
android:textColor="@color/colorPrimary" | ||
android:textSize="16sp" | ||
app:layout_constraintTop_toBottomOf="@+id/input_pin" | ||
android:textSize="14sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent"/> | ||
app:layout_constraintTop_toBottomOf="@+id/input_pin" /> | ||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:layout_marginStart="10dp" | ||
android:gravity="center" | ||
android:id="@+id/show_pin" | ||
app:layout_constraintTop_toTopOf="@+id/input_pin" | ||
android:layout_width="48dp" | ||
android:layout_height="48dp" | ||
android:orientation="vertical" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginEnd="8dp" | ||
app:layout_constraintBottom_toBottomOf="@+id/input_pin" | ||
app:layout_constraintStart_toEndOf="@+id/input_pin"> | ||
app:layout_constraintStart_toEndOf="@+id/input_pin" | ||
app:layout_constraintTop_toTopOf="@+id/input_pin"> | ||
|
||
<ImageView | ||
android:layout_width="36dp" | ||
android:layout_height="36dp" | ||
android:src="@{viewModel.showPassword ? @drawable/ic_hide_eye_icon : @drawable/ic_show_eye_icon}"/> | ||
android:layout_width="32dp" | ||
android:layout_height="32dp" | ||
android:layout_gravity="center_horizontal" | ||
android:src="@{viewModel.showPassword ? @drawable/ic_hide_eye_icon : @drawable/ic_show_eye_icon}" | ||
android:contentDescription="@string/show_hide_password_icon" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="-2dp" | ||
android:layout_height="match_parent" | ||
android:fontFamily="sans-serif" | ||
android:text="@{viewModel.showPassword ? @string/pin_password_hide : @string/pin_password_show}" | ||
android:textAllCaps="true" | ||
android:textSize="12sp" | ||
android:textColor="@color/colorPrimary"/> | ||
android:layout_gravity="center_horizontal" | ||
android:textColor="@color/colorPrimary" | ||
android:textSize="12sp" /> | ||
</LinearLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<dimen name="enter_text_view_padding_start">120dp</dimen> | ||
<dimen name="enter_text_view_padding_end">120dp</dimen> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters