-
Notifications
You must be signed in to change notification settings - Fork 520
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
* Updated implemented - unfinished * Lowfi landscape correct * Updated final implementation * lowfi-profile-chooser-part-1 * Added few textviews * Updated UI * Nit change * Nit changes * Nit change Co-authored-by: Rajat Talesra <talesra@talesra-macbookpro.roam.corp.google.com>
- Loading branch information
Showing
14 changed files
with
614 additions
and
149 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<size android:height="1dp" /> | ||
<solid android:color="@color/oppiaProfileChooserDivider" /> | ||
</shape> |
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,71 @@ | ||
<?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.view.View" /> | ||
|
||
<variable | ||
name="presenter" | ||
type="org.oppia.app.profile.ProfileChooserFragmentPresenter" /> | ||
</data> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
|
||
<View | ||
android:id="@+id/add_profile_divider_view" | ||
android:layout_width="0.5dp" | ||
android:layout_height="match_parent" | ||
android:background="@color/oppiaProfileChooserDivider" | ||
android:visibility="@{presenter.wasProfileEverBeenAddedValue ? View.GONE : View.VISIBLE}" /> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="24dp" | ||
android:gravity="center_horizontal" | ||
android:orientation="vertical"> | ||
|
||
<de.hdodenhof.circleimageview.CircleImageView | ||
android:id="@+id/profile_add_button" | ||
android:layout_width="72dp" | ||
android:layout_height="72dp" | ||
android:layout_marginBottom="12dp" | ||
android:src="@drawable/ic_add_profile" | ||
app:civ_border_color="@color/avatarBorder" | ||
app:civ_border_width="1dp" /> | ||
|
||
<TextView | ||
android:id="@+id/add_profile_text" | ||
android:layout_width="wrap_content" | ||
android:layout_gravity="center" | ||
android:layout_height="wrap_content" | ||
android:fontFamily="sans-serif-medium" | ||
android:text="@{presenter.wasProfileEverBeenAddedValue ? @string/profile_chooser_add : @string/set_up_multiple_profiles}" | ||
android:paddingStart="8dp" | ||
android:paddingEnd="8dp" | ||
android:textColor="@color/white" | ||
android:textSize="14sp" /> | ||
|
||
<TextView | ||
android:id="@+id/add_profile_description_text" | ||
android:layout_width="wrap_content" | ||
android:layout_gravity="center" | ||
android:layout_height="wrap_content" | ||
android:fontFamily="sans-serif-medium" | ||
android:paddingStart="8dp" | ||
android:paddingEnd="8dp" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginEnd="8dp" | ||
android:gravity="center" | ||
android:text="@string/set_up_multiple_profiles_description" | ||
android:textColor="@color/white" | ||
android:textSize="14sp" | ||
android:visibility="@{presenter.wasProfileEverBeenAddedValue ? View.GONE : View.VISIBLE}" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
</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
77 changes: 77 additions & 0 deletions
77
app/src/main/res/layout-land/profile_chooser_profile_view.xml
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,77 @@ | ||
<?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" | ||
xmlns:profile="http://schemas.android.com/tools"> | ||
|
||
<data> | ||
|
||
<import type="android.view.View" /> | ||
|
||
<variable | ||
name="presenter" | ||
type="org.oppia.app.profile.ProfileChooserFragmentPresenter" /> | ||
|
||
<variable | ||
name="viewModel" | ||
type="org.oppia.app.model.ProfileChooserUiModel" /> | ||
</data> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_horizontal" | ||
android:orientation="vertical"> | ||
|
||
<de.hdodenhof.circleimageview.CircleImageView | ||
android:id="@+id/profile_avatar_img" | ||
android:layout_width="72dp" | ||
android:layout_height="72dp" | ||
android:layout_marginBottom="8dp" | ||
app:civ_border_color="@color/avatarBorder" | ||
app:civ_border_width="1dp" | ||
profile:src="@{viewModel.profile.avatar}" /> | ||
|
||
<TextView | ||
android:id="@+id/profile_name_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:ellipsize="end" | ||
android:fontFamily="sans-serif-medium" | ||
android:gravity="center" | ||
android:maxLines="2" | ||
android:paddingStart="8dp" | ||
android:paddingEnd="8dp" | ||
android:singleLine="false" | ||
android:text="@{viewModel.profile.name}" | ||
android:textColor="@color/white" | ||
android:textSize="14sp" /> | ||
|
||
<TextView | ||
android:id="@+id/profile_is_admin_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="2dp" | ||
android:fontFamily="sans-serif-light" | ||
android:gravity="center" | ||
android:paddingStart="8dp" | ||
android:paddingEnd="8dp" | ||
android:text="@string/profile_chooser_admin" | ||
android:textColor="@color/white" | ||
android:textSize="12sp" | ||
android:textStyle="italic" | ||
android:visibility="@{viewModel.profile.isAdmin ? View.VISIBLE : View.GONE}" /> | ||
</LinearLayout> | ||
|
||
<View | ||
android:id="@+id/add_profile_divider_view" | ||
android:layout_width="0.5dp" | ||
android:layout_height="match_parent" | ||
android:visibility="@{presenter.wasProfileEverBeenAddedValue ? View.GONE : View.VISIBLE}" | ||
android:background="@color/oppiaProfileChooserDivider" /> | ||
</LinearLayout> | ||
</layout> |
Oops, something went wrong.