chinwag-android/app/src/main/res/layout/activity_account.xml

238 lines
11 KiB
XML
Raw Normal View History

<?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"
2017-08-05 19:34:50 +10:00
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_account"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:id="@+id/account_app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.Account.AppBarLayout">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:contentScrim="?attr/toolbar_background_color"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/account_header_background_color">
<ImageView
android:id="@+id/account_header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/account_header_info"
android:layout_alignTop="@+id/account_header_info"
android:background="@drawable/account_header_default"
android:contentDescription="@null"
android:fitsSystemWindows="true"
android:scaleType="centerCrop"
app:layout_collapseMode="pin" />
2017-11-06 08:32:36 +11:00
<android.support.constraint.ConstraintLayout
android:id="@+id/account_header_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/account_header_gradient"
2017-08-05 19:34:50 +10:00
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="?attr/actionBarSize"
app:layout_collapseMode="parallax">
2017-08-05 19:34:50 +10:00
<com.pkmmte.view.CircularImageView
android:id="@+id/account_avatar"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginEnd="10dp"
android:src="@drawable/avatar_default"
2017-11-06 08:32:36 +11:00
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
2017-08-05 19:34:50 +10:00
app:shadow="true" />
<Button
android:id="@+id/follow_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2017-11-06 08:32:36 +11:00
android:layout_marginTop="6dp"
2018-02-03 23:34:40 +11:00
android:textSize="?attr/status_text_medium"
2017-11-06 08:32:36 +11:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
2017-08-05 19:34:50 +10:00
<TextView
android:id="@+id/account_follows_you"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:text="@string/follows_you"
2017-11-06 08:32:36 +11:00
android:textColor="?android:textColorPrimary"
2017-12-10 07:34:04 +11:00
android:textSize="?attr/status_text_medium"
2017-11-06 08:32:36 +11:00
app:layout_constraintEnd_toEndOf="@id/follow_btn"
app:layout_constraintTop_toBottomOf="@id/follow_btn" />
2017-08-05 19:34:50 +10:00
EmojiCompat support (#600) * Add EmojiCompat * EmojiCompat doesn' replace all emojis anymore * This app should be now capable of loading a EmojiCompat-font located in a file somewhere inside the device's storage * Should now replace all emojis * Add EmojiCompat support to EditTextTyped * Provide EmojiCompat fonts * The app won't crash anymore when no emoji font is available. Emoji font should now be located at [Private external app directory]/files/EmojiCompat.ttf * Removed BundledEmojiCompat dependency Since this EmojiCompat-implementation does not rely on BundledEmojiCompat, there's no reason to have it enabled. * Update EditTextTyped.kt Since connection isn't assigned to (I tried doing so), it can be declared final/val again. * Update README.md * Add some non-working emoji preferences * Add a short font list for testing * Finished implementation * Add Twemoji to font list * Update documentation, more comments * Delete AssetEmojiCompat which is obsolete now * Update the font list * Update the font list * Fix font list & add Exception handling for malformed JSON files (hopefully) * More fixes. It should work now... * Removed AssetEmojiCompat (again) * Add most of the changes * Improved the EmojiCompat dialog's style * The font list is now based on a static layout without external files * Re-add the real font URL for Twemoji * Emoji-font captions are now translatable * Removed one unused String (loading) * Removed emoji fonts from this repo * Applied changes from the PR change requests * The correct emoji font will be selected after cancelling a change * Add details on the EmojiCompat fonts available (not shown yet) * Add licensing information on Twemoji and Blobmoji * Reworked some strings * Moved FileEmojiCompat to its own library * Update FileEmojiCompat to the latest version (1.0.3) * EmojiCompat bug should be fixed * Better handling of failed downloads * Removed one TODO Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com> * Update emoji attribution strings Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com> * Fixed some misspelled strings Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com>
2018-05-10 19:16:56 +10:00
<android.support.text.emoji.widget.EmojiTextView
2017-08-05 19:34:50 +10:00
android:id="@+id/account_display_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-08-05 19:34:50 +10:00
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_large"
2017-08-05 19:34:50 +10:00
android:textStyle="normal|bold"
2017-11-06 08:32:36 +11:00
app:layout_constraintTop_toBottomOf="@id/account_avatar"
2017-08-05 19:34:50 +10:00
tools:text="Tusky Mastodon Client" />
<TextView
android:id="@+id/account_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
2017-12-10 07:34:04 +11:00
android:textSize="?attr/status_text_medium"
2017-11-06 08:32:36 +11:00
app:layout_constraintTop_toBottomOf="@id/account_display_name"
2017-08-05 19:34:50 +10:00
tools:text="\@Tusky" />
<ImageView
android:id="@+id/account_locked"
android:layout_width="16sp"
android:layout_height="16sp"
android:layout_marginStart="4dp"
android:contentDescription="@string/description_account_locked"
android:tint="?android:textColorSecondary"
android:visibility="gone"
2017-11-06 08:32:36 +11:00
app:layout_constraintBottom_toBottomOf="@id/account_username"
app:layout_constraintLeft_toRightOf="@id/account_username"
app:srcCompat="@drawable/reblog_private_light"
2017-11-06 08:32:36 +11:00
tools:visibility="visible" />
EmojiCompat support (#600) * Add EmojiCompat * EmojiCompat doesn' replace all emojis anymore * This app should be now capable of loading a EmojiCompat-font located in a file somewhere inside the device's storage * Should now replace all emojis * Add EmojiCompat support to EditTextTyped * Provide EmojiCompat fonts * The app won't crash anymore when no emoji font is available. Emoji font should now be located at [Private external app directory]/files/EmojiCompat.ttf * Removed BundledEmojiCompat dependency Since this EmojiCompat-implementation does not rely on BundledEmojiCompat, there's no reason to have it enabled. * Update EditTextTyped.kt Since connection isn't assigned to (I tried doing so), it can be declared final/val again. * Update README.md * Add some non-working emoji preferences * Add a short font list for testing * Finished implementation * Add Twemoji to font list * Update documentation, more comments * Delete AssetEmojiCompat which is obsolete now * Update the font list * Update the font list * Fix font list & add Exception handling for malformed JSON files (hopefully) * More fixes. It should work now... * Removed AssetEmojiCompat (again) * Add most of the changes * Improved the EmojiCompat dialog's style * The font list is now based on a static layout without external files * Re-add the real font URL for Twemoji * Emoji-font captions are now translatable * Removed one unused String (loading) * Removed emoji fonts from this repo * Applied changes from the PR change requests * The correct emoji font will be selected after cancelling a change * Add details on the EmojiCompat fonts available (not shown yet) * Add licensing information on Twemoji and Blobmoji * Reworked some strings * Moved FileEmojiCompat to its own library * Update FileEmojiCompat to the latest version (1.0.3) * EmojiCompat bug should be fixed * Better handling of failed downloads * Removed one TODO Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com> * Update emoji attribution strings Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com> * Fixed some misspelled strings Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com>
2018-05-10 19:16:56 +10:00
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/account_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2017-08-05 19:34:50 +10:00
android:layout_below="@id/account_username"
android:paddingBottom="16dp"
android:paddingTop="10dp"
2017-08-05 19:34:50 +10:00
android:textColor="?android:textColorTertiary"
2017-12-10 07:34:04 +11:00
android:textSize="?attr/status_text_medium"
2017-11-06 08:32:36 +11:00
app:layout_constraintTop_toBottomOf="@id/account_username"
2017-08-05 19:34:50 +10:00
tools:text="This is a test description" />
2017-11-06 08:32:36 +11:00
<TextView
android:id="@+id/followers_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
2017-12-01 06:12:09 +11:00
android:background="@android:color/transparent"
android:textColor="@color/account_tab_font_color"
2017-12-10 07:34:04 +11:00
android:textSize="?attr/status_text_medium"
2017-11-06 08:32:36 +11:00
app:layout_constraintBottom_toBottomOf="parent"
2017-12-01 06:12:09 +11:00
app:layout_constraintHorizontal_bias="0"
2017-11-06 08:32:36 +11:00
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/account_note"
2017-12-01 06:12:09 +11:00
tools:text="3000 Followers" />
2017-11-06 08:32:36 +11:00
<TextView
android:id="@+id/following_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2017-12-01 06:12:09 +11:00
android:textColor="@color/account_tab_font_color"
2017-12-10 07:34:04 +11:00
android:textSize="?attr/status_text_medium"
2017-11-06 08:32:36 +11:00
app:layout_constraintBottom_toBottomOf="@id/followers_tv"
app:layout_constraintEnd_toStartOf="@id/statuses_btn"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/followers_tv"
app:layout_constraintTop_toTopOf="@id/followers_tv"
2017-12-01 06:12:09 +11:00
tools:text="500 Following" />
2017-11-06 08:32:36 +11:00
<TextView
android:id="@+id/statuses_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2017-12-01 06:12:09 +11:00
android:textColor="@color/account_tab_font_color"
android:textSize="?attr/status_text_medium"
2017-12-10 07:34:04 +11:00
app:layout_constraintEnd_toEndOf="parent"
2017-11-06 08:32:36 +11:00
app:layout_constraintHorizontal_bias="0"
2017-12-01 06:12:09 +11:00
app:layout_constraintStart_toEndOf="@id/following_tv"
app:layout_constraintTop_toTopOf="@id/followers_tv"
tools:text="3000 Posts" />
2017-11-06 08:32:36 +11:00
</android.support.constraint.ConstraintLayout>
</RelativeLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentTop="true"
android:layout_gravity="top"
android:background="@android:color/transparent"
app:layout_collapseMode="pin"
app:popupTheme="?attr/toolbar_popup_theme" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-11-06 08:32:36 +11:00
android:background="?android:colorBackground"
2017-12-01 06:12:09 +11:00
app:tabGravity="fill"
2017-12-10 07:34:04 +11:00
app:tabIndicatorHeight="3dp"
2017-12-01 06:12:09 +11:00
app:tabMaxWidth="0dp"
2017-12-10 07:34:04 +11:00
app:tabSelectedTextColor="?attr/colorAccent"
app:tabTextAppearance="@style/TuskyTabAppearance">
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.design.widget.TabLayout>
</android.support.v4.view.ViewPager>
<View
android:id="@+id/tab_bottom_shadow"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@drawable/material_drawer_shadow_bottom"
android:visibility="visible"
app:layout_anchor="@id/tab_layout"
app:layout_anchorGravity="bottom" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/floating_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:contentDescription="@string/action_mention"
app:srcCompat="@drawable/ic_create_24dp" />
<include layout="@layout/item_status_bottom_sheet"/>
</android.support.design.widget.CoordinatorLayout>