added a basic compose screen, and the 3 main timelines in a tabbed layout

This commit is contained in:
Vavassor 2017-01-07 17:24:02 -05:00
commit 370b1e52aa
30 changed files with 1367 additions and 234 deletions

View file

@ -0,0 +1,11 @@
<vector android:height="24dp" android:viewportHeight="708.66144"
android:viewportWidth="708.66144" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#ffffff"
android:pathData="m86.4,17.7c-37.3,0 -67.3,30 -67.3,67.3l0,538.6c0,37.3 30,67.3 67.3,67.3l537.2,0c37.3,0 67.3,-30 67.3,-67.3l0,-462.4c-17.6,17.9 -35.4,35.6 -53.2,53.3l0,352.4c0,39.3 -31.6,70.9 -70.9,70.9l-425.2,0c-39.3,0 -70.9,-31.6 -70.9,-70.9l0,-425.2c0,-39.3 31.6,-70.9 70.9,-70.9l358.9,0c18,-17.7 36,-35.3 53.8,-53.2l-468,0z"
android:strokeAlpha="1" android:strokeColor="#ffffff"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="33.62945938"/>
<path android:fillAlpha="1" android:fillColor="#ffffff"
android:pathData="m672.8,8.2 l25.1,25.1c13.9,13.9 13.9,36.2 0,50.1L361.6,420.4C347.1,434.2 199.5,537.2 185.6,523.3l-0.8,-0.8C170.9,508.6 272.1,359.2 286.6,344.7L622.7,8.2c13.9,-13.9 36.2,-13.9 50.1,0z"
android:strokeAlpha="1" android:strokeColor="#cccccc"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="0"/>
</vector>

View file

@ -0,0 +1,15 @@
<vector android:height="24dp" android:viewportHeight="708.66144"
android:viewportWidth="708.66144" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#4d4d4d"
android:pathData="M177.2,354.3m-70.9,0a70.9,70.9 0,1 1,141.7 0a70.9,70.9 0,1 1,-141.7 0"
android:strokeAlpha="1" android:strokeColor="#6d6d6d"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="14.17322826"/>
<path android:fillAlpha="1" android:fillColor="#4d4d4d"
android:pathData="M354.3,354.3m-70.9,0a70.9,70.9 0,1 1,141.7 0a70.9,70.9 0,1 1,-141.7 0"
android:strokeAlpha="1" android:strokeColor="#6d6d6d"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="14.17322826"/>
<path android:fillAlpha="1" android:fillColor="#4d4d4d"
android:pathData="M531.5,354.3m-70.9,0a70.9,70.9 0,1 1,141.7 0a70.9,70.9 0,1 1,-141.7 0"
android:strokeAlpha="1" android:strokeColor="#6d6d6d"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="14.17322826"/>
</vector>

View file

@ -0,0 +1,7 @@
<vector android:height="24dp" android:viewportHeight="708.66144"
android:viewportWidth="708.66144" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#4d4d4d"
android:pathData="M354.3,33.9 L458.4,244.9 691.2,278.7 522.8,442.9 562.5,674.7 354.3,565.3 146.1,674.7 185.9,442.9 17.5,278.7 250.2,244.9Z"
android:strokeAlpha="1" android:strokeColor="#6d6d6d"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="33.33507919"/>
</vector>

View file

@ -0,0 +1,7 @@
<vector android:height="24dp" android:viewportHeight="708.66144"
android:viewportWidth="708.66144" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#feef00"
android:pathData="M354.3,33.9 L458.4,244.9 691.2,278.7 522.8,442.9 562.5,674.7 354.3,565.3 146.1,674.7 185.9,442.9 17.5,278.7 250.2,244.9Z"
android:strokeAlpha="1" android:strokeColor="#feef00"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="33.33507919"/>
</vector>

View file

@ -0,0 +1,11 @@
<vector android:height="24dp" android:viewportHeight="708.66144"
android:viewportWidth="708.66144" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#cccccc"
android:pathData="M141.1,141.7L-0.6,283.5L105.7,283.5L105.7,527.5L176.5,456.7L176.5,283.5L282.8,283.5L141.1,141.7zM213.5,141.7L284.4,212.6L420.6,212.6L491.5,141.7L213.5,141.7zM603.3,182.8L532.4,253.7L532.4,460.6L426.1,460.6L567.9,602.4L709.6,460.6L603.3,460.6L603.3,182.8zM254.6,531.5L183.8,602.4L495.4,602.4L424.6,531.5L254.6,531.5z"
android:strokeAlpha="1" android:strokeColor="#cccccc"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="15"/>
<path android:fillAlpha="1" android:fillColor="#cccccc"
android:pathData="M680,28.6L680,28.6A35.4,35.4 76.1,0 1,680 78.7L78.7,680A35.4,35.4 90.3,0 1,28.6 680L28.6,680A35.4,35.4 90.3,0 1,28.6 629.9L629.9,28.6A35.4,35.4 76.1,0 1,680 28.6z"
android:strokeAlpha="1" android:strokeColor="#bebebe"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="0"/>
</vector>

View file

@ -0,0 +1,11 @@
<vector android:height="24dp" android:viewportHeight="708.66144"
android:viewportWidth="708.66144" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#4d4d4d"
android:pathData="m567.9,602.4 l-141.7,-141.7 106.3,0 0,-248 -248,0 -70.9,-70.9 389.8,0 0,318.9 106.3,0z"
android:strokeAlpha="1" android:strokeColor="#6d6d6d"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="14.17322835"/>
<path android:fillColor="#4d4d4d"
android:pathData="m141.1,141.7 l141.7,141.7 -106.3,0 0,248 248,0 70.9,70.9 -389.8,0 0,-318.9 -106.3,0z"
android:strokeAlpha="1" android:strokeColor="#6d6d6d"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="14.17322826"/>
</vector>

View file

@ -0,0 +1,11 @@
<vector android:height="24dp" android:viewportHeight="708.66144"
android:viewportWidth="708.66144" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#008080"
android:pathData="m567.9,602.4 l-141.7,-141.7 106.3,0 0,-248 -248,0 -70.9,-70.9 389.8,0 0,318.9 106.3,0z"
android:strokeAlpha="1" android:strokeColor="#3c9b9e"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="14.173"/>
<path android:fillColor="#008080"
android:pathData="m141.1,141.7 l141.7,141.7 -106.3,0 0,248 248,0 70.9,70.9 -389.8,0 0,-318.9 -106.3,0z"
android:strokeAlpha="1" android:strokeColor="#3c9b9e"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="14.17322826"/>
</vector>

View file

@ -0,0 +1,7 @@
<vector android:height="24dp" android:viewportHeight="708.66144"
android:viewportWidth="708.66144" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#4d4d4d"
android:pathData="m40.4,348.7c200,-200 200,-200 200,-200l0,120 440,0 0,320 -160,0 0,-160 -280,0 0,120z"
android:strokeAlpha="1" android:strokeColor="#6d6d6d"
android:strokeLineCap="butt" android:strokeLineJoin="round" android:strokeWidth="21.25984252"/>
</vector>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:inputType="textMultiLine"
android:ems="10"
android:gravity="top|left"
android:id="@+id/field_status"
android:contentDescription="What's Happening?"
android:layout_height="wrap_content"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:id="@+id/radio_visibility"
android:checkedButton="@+id/radio_public">
<RadioButton
android:text="@string/visibility_public"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/radio_public"
android:layout_weight="1" />
<RadioButton
android:text="@string/visibility_unlisted"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/radio_unlisted"
android:layout_weight="1" />
<RadioButton
android:text="@string/visibility_private"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/radio_private"
android:layout_weight="1" />
</RadioGroup>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
android:id="@+id/characters_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="500" />
<Button
android:text="TOOT"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button_send" />
</LinearLayout>
</LinearLayout>

View file

@ -19,18 +19,34 @@
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="wrap_content">
</android.support.v4.widget.SwipeRefreshLayout>
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_home" />
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_notifications" />
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_public" />
</android.support.design.widget.TabLayout>
</android.support.v4.view.ViewPager>
</LinearLayout>

View file

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

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/notification_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

View file

@ -76,4 +76,63 @@
android:layout_toEndOf="@+id/status_avatar"
android:layout_below="@+id/status_name_bar" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/status_content"
android:layout_toRightOf="@+id/status_avatar"
android:paddingBottom="8dp"
android:paddingTop="8dp">
<ImageButton
app:srcCompat="@drawable/ic_reply"
android:id="@+id/status_reply"
style="?android:attr/borderlessButtonStyle"
android:layout_width="32dp"
android:layout_height="32dp" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageButton
app:srcCompat="@drawable/ic_reblog_off"
android:id="@+id/status_reblog"
style="?android:attr/borderlessButtonStyle"
android:layout_width="32dp"
android:layout_height="32dp" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageButton
android:layout_width="32dp"
android:layout_height="32dp"
app:srcCompat="@drawable/ic_favourite_off"
android:id="@+id/status_favourite"
style="?android:attr/borderlessButtonStyle" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageButton
app:srcCompat="@drawable/ic_extra"
android:id="@+id/status_more"
style="?android:attr/borderlessButtonStyle"
android:layout_width="32dp"
android:layout_height="32dp" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
</RelativeLayout>

View file

@ -1,7 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_compose"
android:title="@string/action_compose"
android:icon="@drawable/ic_compose"
app:showAsAction="always" />
<item
android:id="@+id/action_logout"

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/status_follow"
android:title="@string/action_follow" />
<item android:title="@string/action_block"
android:id="@+id/status_block" />
</menu>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="@string/action_delete"
android:id="@+id/status_delete" />
</menu>

View file

@ -5,15 +5,63 @@
<string name="oauth_redirect_host">oauth2redirect</string>
<string name="preferences_file_key">com.keylesspalace.tusky.PREFERENCES</string>
<string name="endpoint_status">/api/v1/statuses</string>
<string name="endpoint_media">/api/v1/media</string>
<string name="endpoint_timelines_home">/api/v1/timelines/home</string>
<string name="endpoint_timelines_mentions">/api/v1/timelines/mentions</string>
<string name="endpoint_timelines_public">/api/v1/timelines/public</string>
<string name="endpoint_timelines_tag">/api/v1/timelines/tag/%s</string>
<string name="endpoint_notifications">/api/v1/notifications</string>
<string name="endpoint_follows">/api/v1/follows</string>
<string name="endpoint_get_status">/api/v1/statuses/%s</string>
<string name="endpoint_accounts">/api/v1/accounts/%s</string>
<string name="endpoint_verify_credentials">/api/v1/accounts/verify_credentials</string>
<string name="endpoint_statuses">/api/v1/accounts/%s/statuses</string>
<string name="endpoint_following">/api/v1/accounts/%s/following</string>
<string name="endpoint_followers">/api/v1/accounts/%s/followers</string>
<string name="endpoint_relationships">/api/v1/accounts/relationships</string>
<string name="endpoint_blocks">/api/v1/blocks</string>
<string name="endpoint_favourites">/api/v1/favourites</string>
<string name="endpoint_delete">/api/v1/statuses/%s</string>
<string name="endpoint_reblog">/api/v1/statuses/%s/reblog</string>
<string name="endpoint_unreblog">/api/v1/statuses/%s/unreblog</string>
<string name="endpoint_favourite">/api/v1/statuses/%s/favourite</string>
<string name="endpoint_unfavourite">/api/v1/statuses/%s/unfavourite</string>
<string name="endpoint_context">/api/v1/statuses/%s/context</string>
<string name="endpoint_reblogged_by">/api/v1/statuses/%s/reblogged_by</string>
<string name="endpoint_favourited_by">/api/v1/statuses/%s/favourited_by</string>
<string name="endpoint_follow">/api/v1/accounts/%s/follow</string>
<string name="endpoint_unfollow">/api/v1/accounts/%s/unfollow</string>
<string name="endpoint_block">/api/v1/accounts/%s/block</string>
<string name="endpoint_unblock">/api/v1/accounts/%s/unblock</string>
<string name="endpoint_apps">/api/v1/apps</string>
<string name="endpoint_authorize">/oauth/authorize</string>
<string name="endpoint_token">/oauth/token</string>
<string name="endpoint_apps">/api/v1/apps</string>
<string name="endpoint_timelines_home">/api/v1/timelines/home</string>
<string name="error_fetching_timeline">Tusky failed to fetch the timeline.</string>
<string name="error_fetching_notifications">Notifications could not be fetched.</string>
<string name="error_compose_character_limit">The toot is too long!</string>
<string name="error_sending_status">The toot failed to be sent.</string>
<string name="title_home">Home</string>
<string name="title_notifications">Notifications</string>
<string name="title_public">Public</string>
<string name="status_username_format">\@%s</string>
<string name="status_boosted_format">%s boosted</string>
<string name="notification_reblog_format">%s boosted your status</string>
<string name="notification_favourite_format">%s favourited your status</string>
<string name="notification_follow_format">%s followed you</string>
<string name="action_compose">Compose</string>
<string name="action_logout">Log Out</string>
<string name="action_follow">Follow</string>
<string name="action_block">Block</string>
<string name="action_delete">Delete</string>
<string name="visibility_public">Public</string>
<string name="visibility_private">Private</string>
<string name="visibility_unlisted">Unlisted</string>
</resources>