mirror of https://github.com/ThmmyNoLife/mTHMMY
Apostolos Fanakis
8 years ago
12 changed files with 470 additions and 65 deletions
@ -0,0 +1,9 @@ |
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:width="24dp" |
|||
android:height="24dp" |
|||
android:viewportWidth="24.0" |
|||
android:viewportHeight="24.0"> |
|||
<path |
|||
android:fillColor="#FFFFFF" |
|||
android:pathData="M21.99,4c0,-1.1 -0.89,-2 -1.99,-2L4,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h14l4,4 -0.01,-18zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z"/> |
|||
</vector> |
@ -0,0 +1,118 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.design.widget.CoordinatorLayout |
|||
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:id="@+id/main_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:fitsSystemWindows="true" |
|||
tools:context=".activities.profile.ProfileActivity"> |
|||
|
|||
<android.support.design.widget.AppBarLayout |
|||
android:id="@+id/appbar" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:paddingTop="@dimen/appbar_padding_top" |
|||
android:theme="@style/ToolbarTheme"> |
|||
|
|||
<android.support.design.widget.CollapsingToolbarLayout |
|||
android:id="@+id/main.collapsing" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:fitsSystemWindows="true" |
|||
app:contentScrim="?attr/colorPrimary" |
|||
app:expandedTitleMarginEnd="64dp" |
|||
app:expandedTitleMarginStart="48dp" |
|||
app:layout_scrollFlags="scroll|exitUntilCollapsed"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="5dp" |
|||
android:gravity="center" |
|||
android:orientation="vertical"> |
|||
|
|||
<ImageView |
|||
android:id="@+id/user_thumbnail" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:adjustViewBounds="true" |
|||
android:contentDescription="@string/thumbnail" |
|||
android:fitsSystemWindows="true" |
|||
android:src="@drawable/ic_default_user_thumbnail" |
|||
android:transitionName="user_thumbnail" |
|||
app:layout_collapseMode="parallax"/> |
|||
|
|||
<TextView |
|||
android:id="@+id/profile_act_personal_text" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:textColor="@color/primary_text" |
|||
android:visibility="gone"/> |
|||
</LinearLayout> |
|||
</android.support.design.widget.CollapsingToolbarLayout> |
|||
|
|||
<android.support.v7.widget.Toolbar |
|||
android:id="@+id/toolbar" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="?attr/actionBarSize" |
|||
android:background="?attr/colorPrimary" |
|||
android:gravity="center" |
|||
app:popupTheme="@style/ToolbarTheme"> |
|||
|
|||
<TextView |
|||
android:id="@+id/profile_act_username" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:textColor="@color/accent" |
|||
android:textSize="25sp"/> |
|||
</android.support.v7.widget.Toolbar> |
|||
</android.support.design.widget.AppBarLayout> |
|||
|
|||
<ProgressBar |
|||
android:id="@+id/progressBar" |
|||
style="@style/Widget.AppCompat.ProgressBar.Horizontal" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:indeterminate="true" |
|||
android:theme="@style/AppTheme" |
|||
android:visibility="invisible" |
|||
app:layout_anchor="@id/appbar" |
|||
app:layout_anchorGravity="bottom|center"/> |
|||
|
|||
<android.support.v4.widget.NestedScrollView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:layout_gravity="top|start" |
|||
android:background="@color/background" |
|||
android:paddingEnd="16dp" |
|||
android:paddingStart="16dp" |
|||
android:scrollbars="none" |
|||
app:layout_anchor="@id/appbar" |
|||
app:layout_anchorGravity="bottom|center" |
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/profile_act_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center" |
|||
android:orientation="vertical"> |
|||
</LinearLayout> |
|||
</android.support.v4.widget.NestedScrollView> |
|||
|
|||
<android.support.design.widget.FloatingActionButton |
|||
android:id="@+id/profile_fab" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="bottom|end" |
|||
android:layout_margin="@dimen/fab_margins" |
|||
app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareFABBehavior" |
|||
app:srcCompat="@drawable/ic_pm_fab"/> |
|||
</android.support.design.widget.CoordinatorLayout> |
|||
|
|||
|
@ -0,0 +1,246 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:orientation="vertical" |
|||
android:paddingEnd="4dp" |
|||
android:paddingStart="4dp" |
|||
tools:ignore="SmallSp"> |
|||
|
|||
<FrameLayout |
|||
android:id="@+id/post_date_and_number_exp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="7dp" |
|||
android:animateLayoutChanges="true" |
|||
android:visibility="gone"> |
|||
|
|||
<TextView |
|||
android:id="@+id/post_date" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="start" |
|||
android:paddingEnd="5dp" |
|||
android:paddingStart="5dp" |
|||
android:text="" |
|||
android:textColor="@color/card_expand_text_color" |
|||
android:textSize="8sp" |
|||
/> |
|||
|
|||
<TextView |
|||
android:id="@+id/post_number" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="end" |
|||
android:paddingEnd="5dp" |
|||
android:paddingStart="5dp" |
|||
android:text="" |
|||
android:textColor="@color/card_expand_text_color" |
|||
android:textSize="8sp" |
|||
/> |
|||
</FrameLayout> |
|||
|
|||
<android.support.v7.widget.CardView |
|||
xmlns:card_view="http://schemas.android.com/apk/res-auto" |
|||
android:id="@+id/card_view" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:layout_gravity="center" |
|||
android:foreground="?android:attr/selectableItemBackground" |
|||
card_view:cardBackgroundColor="@color/card_background" |
|||
card_view:cardCornerRadius="0dp" |
|||
card_view:cardElevation="2dp" |
|||
card_view:cardPreventCornerOverlap="true" |
|||
card_view:cardUseCompatPadding="true"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:orientation="horizontal"> |
|||
|
|||
<RelativeLayout |
|||
android:id="@+id/header" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_weight="1" |
|||
android:clickable="true" |
|||
android:paddingLeft="16dp" |
|||
android:paddingRight="16dp" |
|||
android:paddingTop="16dp"> |
|||
|
|||
<FrameLayout |
|||
android:id="@+id/thumbnail_holder" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_alignParentTop="true" |
|||
android:layout_centerVertical="true" |
|||
android:layout_marginEnd="16dp"> |
|||
|
|||
<ImageView |
|||
android:id="@+id/thumbnail" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:adjustViewBounds="true" |
|||
android:contentDescription="@string/thumbnail" |
|||
android:maxHeight="@dimen/thumbnail_size" |
|||
android:maxWidth="@dimen/thumbnail_size" |
|||
android:src="@drawable/ic_default_user_thumbnail" |
|||
android:transitionName="user_thumbnail"/> |
|||
</FrameLayout> |
|||
|
|||
<TextView |
|||
android:id="@+id/username" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_alignParentTop="true" |
|||
android:layout_toEndOf="@+id/thumbnail_holder" |
|||
android:ellipsize="end" |
|||
android:maxLines="1" |
|||
android:text="@string/username" |
|||
android:textColor="@color/primary_text" |
|||
android:textStyle="bold"/> |
|||
|
|||
<TextView |
|||
android:id="@+id/subject" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_below="@+id/username" |
|||
android:layout_toEndOf="@+id/thumbnail_holder" |
|||
android:ellipsize="end" |
|||
android:maxLines="1" |
|||
android:text="@string/subject" |
|||
/> |
|||
</RelativeLayout> |
|||
|
|||
<ImageButton |
|||
android:id="@+id/toggle_quote_button" |
|||
android:layout_width="@dimen/quote_button" |
|||
android:layout_height="@dimen/quote_button" |
|||
android:layout_marginEnd="9dp" |
|||
android:layout_marginTop="9dp" |
|||
android:background="@drawable/ic_toggle_quote_bg" |
|||
android:contentDescription="@string/quote"/> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/user_extra_info" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:clickable="true" |
|||
android:orientation="vertical" |
|||
android:paddingLeft="16dp" |
|||
android:paddingRight="16dp" |
|||
android:paddingTop="3dp" |
|||
android:visibility="gone" |
|||
android:weightSum="1.0"> |
|||
|
|||
<TextView |
|||
android:id="@+id/special_rank" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:textColor="@color/card_expand_text_color" |
|||
android:textSize="10sp" |
|||
android:visibility="gone"/> |
|||
|
|||
<TextView |
|||
android:id="@+id/rank" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:textColor="@color/card_expand_text_color" |
|||
android:textSize="10sp" |
|||
android:visibility="gone"/> |
|||
|
|||
<TextView |
|||
android:id="@+id/stars" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="2dp" |
|||
android:textSize="10sp" |
|||
android:visibility="gone"> |
|||
</TextView> |
|||
|
|||
<TextView |
|||
android:id="@+id/gender" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:textColor="@color/card_expand_text_color" |
|||
android:textSize="10sp" |
|||
android:visibility="gone"/> |
|||
|
|||
<TextView |
|||
android:id="@+id/number_of_posts" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:textColor="@color/card_expand_text_color" |
|||
android:textSize="10sp" |
|||
android:visibility="gone"/> |
|||
|
|||
<TextView |
|||
android:id="@+id/personal_text" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:textColor="@color/card_expand_text_color" |
|||
android:textSize="10sp" |
|||
android:textStyle="italic" |
|||
android:visibility="gone"/> |
|||
|
|||
</LinearLayout> |
|||
|
|||
<View |
|||
android:id="@+id/header_body_devider" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="1dp" |
|||
android:layout_marginBottom="9dp" |
|||
android:layout_marginLeft="16dp" |
|||
android:layout_marginRight="16dp" |
|||
android:layout_marginTop="16dp" |
|||
android:background="@color/divider"/> |
|||
|
|||
<FrameLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:layout_marginBottom="16dp"> |
|||
|
|||
<WebView |
|||
android:id="@+id/post" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:layout_marginLeft="16dp" |
|||
android:layout_marginRight="16dp" |
|||
android:background="@color/card_background" |
|||
android:clickable="true" |
|||
android:text="@string/post" |
|||
/> |
|||
</FrameLayout> |
|||
|
|||
<View |
|||
android:id="@+id/body_footer_divider" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="1dp" |
|||
android:layout_marginBottom="5dp" |
|||
android:layout_marginLeft="16dp" |
|||
android:layout_marginRight="16dp" |
|||
android:layout_marginTop="9dp" |
|||
android:background="@color/divider" |
|||
android:visibility="gone"/> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/post_footer" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical" |
|||
android:paddingBottom="9dp" |
|||
android:paddingLeft="16dp" |
|||
android:paddingRight="16dp"> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</android.support.v7.widget.CardView> |
|||
</LinearLayout> |
Loading…
Reference in new issue