Merge branch 'master' into feature/about-page

This commit is contained in:
serage.betelmal 2017-04-30 21:09:09 +01:00
commit 9b86c93e76
99 changed files with 4321 additions and 893 deletions

View file

@ -5,7 +5,7 @@
android:id="@+id/activity_view_thread"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.keylesspalace.tusky.BlocksActivity">
tools:context="com.keylesspalace.tusky.AccountListActivity">
<LinearLayout
android:layout_width="match_parent"

View file

@ -19,6 +19,33 @@
android:background="@android:color/transparent"
android:elevation="4dp" />
<LinearLayout
android:id="@+id/compose_content_warning_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="8dp">
<EditText
android:id="@+id/field_content_warning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:ems="10"
android:maxLines="1"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:hint="@string/hint_content_warning"
android:inputType="text|textCapSentences" />
<View
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/compose_edit_area"
android:layout_width="match_parent"
@ -56,32 +83,6 @@
</RelativeLayout>
<LinearLayout
android:id="@+id/compose_content_warning_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="8dp">
<EditText
android:id="@+id/field_content_warning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:ems="10"
android:maxLines="1"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:hint="@string/hint_content_warning"
android:inputType="text|textCapSentences" />
<View
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -91,6 +92,15 @@
android:paddingRight="16dp"
android:paddingTop="4dp">
<ImageButton
android:id="@+id/compose_photo_take"
style="?attr/image_button_style"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginRight="8dp"
app:srcCompat="@drawable/ic_camera_24dp"
android:contentDescription="@string/action_photo_take" />
<ImageButton
android:id="@+id/compose_photo_pick"
style="?attr/image_button_style"

View file

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.keylesspalace.tusky.EditProfileActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@android:color/transparent"
android:elevation="4dp" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_display_name"
android:hint="@string/hint_display_name"
android:maxLength="30"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_note"
android:hint="@string/hint_note"
android:maxLength="160"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_avatar"
android:labelFor="@+id/edit_profile_avatar"
android:layout_marginRight="8dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@id/edit_profile_avatar"
android:text="@string/action_photo_pick"
android:textColor="@color/text_color_primary_dark" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:id="@+id/edit_profile_avatar_preview"
android:contentDescription="@null"
android:visibility="gone" />
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_avatar_progress"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_header"
android:labelFor="@+id/edit_profile_header"
android:layout_marginRight="8dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@id/edit_profile_header"
android:text="@string/action_photo_pick"
android:textColor="@color/text_color_primary_dark" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp">
<ImageView
android:layout_width="167.2dp"
android:layout_height="80dp"
android:id="@+id/edit_profile_header_preview"
android:contentDescription="@null"
android:visibility="gone" />
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_header_progress"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
<ProgressBar
android:id="@+id/edit_profile_save_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="gone"
android:layout_gravity="center" />
</android.support.design.widget.CoordinatorLayout>

View file

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<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/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -28,10 +27,12 @@
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:paddingTop="?attr/actionBarSize"
app:tabTextAppearance="@style/TabLayoutTextStyle"
app:tabGravity="fill"
app:tabMaxWidth="0dp"
app:tabPaddingEnd="1dp"
app:tabPaddingStart="1dp"
app:tabPaddingTop="4dp"
app:tabPaddingEnd="1dp">
app:tabTextAppearance="@style/TabLayoutTextStyle">
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
@ -63,34 +64,34 @@
android:id="@+id/floating_search_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:floatingSearch_searchBarMarginLeft="6dp"
app:floatingSearch_searchBarMarginTop="4dp"
app:floatingSearch_searchBarMarginRight="6dp"
app:floatingSearch_searchHint="@string/search"
app:floatingSearch_suggestionsListAnimDuration="250"
app:floatingSearch_showSearchKey="false"
app:floatingSearch_close_search_on_keyboard_dismiss="true"
app:floatingSearch_leftActionMode="showHamburger"
app:floatingSearch_close_search_on_keyboard_dismiss="true"/>
app:floatingSearch_searchBarMarginLeft="6dp"
app:floatingSearch_searchBarMarginRight="6dp"
app:floatingSearch_searchBarMarginTop="4dp"
app:floatingSearch_searchHint="@string/search"
app:floatingSearch_showSearchKey="false"
app:floatingSearch_suggestionsListAnimDuration="250" />
<View
android:id="@+id/tab_bottom_shadow"
android:layout_width="match_parent"
android:layout_height="2dp"
app:layout_anchor="@id/tab_layout"
app:layout_anchorGravity="bottom"
android:background="@drawable/material_drawer_shadow_bottom"
android:visibility="visible" />
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_margin="16dp"
android:clickable="true"
android:contentDescription="@string/action_compose"
app:layout_anchor="@id/pager"
app:layout_anchorGravity="bottom|end"
android:clickable="true"
android:layout_margin="16dp"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_create_24dp"
android:contentDescription="@string/action_compose" />
app:srcCompat="@drawable/ic_create_24dp" />
<FrameLayout
android:id="@+id/overlay_fragment_container"

View file

@ -15,23 +15,48 @@
<RadioButton
android:text="@string/visibility_public"
android:button="@drawable/ic_public_24dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/radio_public"
android:layout_marginBottom="5dp"
android:paddingLeft="10dp"
android:buttonTint="@color/drawer_visibility_panel_item"
android:layout_weight="1" />
<RadioButton
android:text="@string/visibility_unlisted"
android:button="@drawable/ic_lock_open_24dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/radio_unlisted"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:paddingLeft="10dp"
android:buttonTint="@color/drawer_visibility_panel_item"
android:layout_weight="1" />
<RadioButton
android:text="@string/visibility_private"
android:button="@drawable/ic_lock_outline_24dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/radio_private"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:paddingLeft="10dp"
android:buttonTint="@color/drawer_visibility_panel_item"
android:layout_weight="1" />
<RadioButton
android:text="@string/visibility_direct"
android:button="@drawable/ic_email_24dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/radio_direct"
android:layout_marginTop="5dp"
android:paddingLeft="10dp"
android:buttonTint="@color/drawer_visibility_panel_item"
android:layout_weight="1" />
</RadioGroup>

View file

@ -1,7 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.RecyclerView
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recycler_view"
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
</android.support.v4.widget.SwipeRefreshLayout>

View file

@ -13,7 +13,8 @@
android:id="@+id/blocked_user_avatar"
android:layout_alignParentLeft="true"
android:layout_marginRight="24dp"
android:layout_centerVertical="true"/>
android:layout_centerVertical="true"
android:contentDescription="@string/action_view_profile" />
<ImageButton
app:srcCompat="@drawable/ic_clear_24dp"

View file

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="72dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center_vertical">
<com.pkmmte.view.CircularImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:id="@+id/follow_request_avatar"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginRight="24dp"
android:layout_marginEnd="24dp"
android:layout_centerVertical="true"
android:contentDescription="@string/action_view_profile" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_toRightOf="@id/follow_request_avatar"
android:layout_toEndOf="@id/follow_request_avatar"
android:layout_toLeftOf="@+id/follow_request_accept"
android:layout_toStartOf="@id/follow_request_accept">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/follow_request_display_name"
android:text="Display name"
android:maxLines="1"
android:ellipsize="end"
android:textSize="16sp"
android:textColor="?android:textColorPrimary"
android:textStyle="normal|bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="\@username"
android:maxLines="1"
android:ellipsize="end"
android:textSize="14sp"
android:id="@+id/follow_request_username"
android:textColor="?android:textColorSecondary" />
</LinearLayout>
<ImageButton
android:layout_width="24dp"
android:layout_height="24dp"
style="?attr/image_button_style"
android:id="@+id/follow_request_accept"
app:srcCompat="@drawable/ic_check_24dp"
android:layout_toLeftOf="@+id/follow_request_reject"
android:layout_toStartOf="@id/follow_request_reject"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_centerVertical="true"
android:contentDescription="@string/action_accept" />
<ImageButton
android:layout_width="24dp"
android:layout_height="24dp"
style="?attr/image_button_style"
android:id="@id/follow_request_reject"
app:srcCompat="@drawable/ic_reject_24dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_centerVertical="true"
android:contentDescription="@string/action_reject" />
</RelativeLayout>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/elephant_friend" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/footer_empty"
android:textAlignment="center" />
</LinearLayout>

View file

@ -0,0 +1,9 @@
<?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="match_parent"
android:gravity="center"
android:orientation="vertical">
</LinearLayout>

View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="72dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center_vertical">
<com.pkmmte.view.CircularImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:id="@+id/muted_user_avatar"
android:layout_alignParentLeft="true"
android:layout_marginRight="24dp"
android:layout_centerVertical="true"
android:contentDescription="@string/action_view_profile" />
<ImageButton
app:srcCompat="@drawable/ic_unmute_24dp"
android:layout_width="24dp"
android:layout_height="24dp"
android:id="@+id/muted_user_unmute"
android:layout_gravity="center_vertical"
style="?attr/image_button_style"
android:layout_alignParentRight="true"
android:layout_marginLeft="16dp"
android:layout_centerVertical="true"
android:contentDescription="@string/action_unmute" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_toRightOf="@id/muted_user_avatar"
android:layout_toLeftOf="@id/muted_user_unmute">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/muted_user_display_name"
android:text="Display name"
android:maxLines="1"
android:ellipsize="end"
android:textSize="16sp"
android:textColor="?android:textColorPrimary"
android:textStyle="normal|bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="\@username"
android:maxLines="1"
android:ellipsize="end"
android:textSize="14sp"
android:id="@+id/muted_user_username"
android:textColor="?android:textColorSecondary" />
</LinearLayout>
</RelativeLayout>

View file

@ -9,6 +9,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/title"
android:layout_marginTop="8dp"
android:layout_centerHorizontal="true"
android:textAllCaps="true"
android:textStyle="normal|bold" />