mirror of
https://github.com/KokaKiwi/BarInsta
synced 2026-03-05 12:01:35 +00:00
Add account switcher in MorePreferencesFragment
This commit is contained in:
parent
3e7097ff6d
commit
00762c85e6
24 changed files with 760 additions and 154 deletions
10
app/src/main/res/drawable/ic_arrow_drop_down_24.xml
Normal file
10
app/src/main/res/drawable/ic_arrow_drop_down_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,10l5,5 5,-5z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_check_24.xml
Normal file
10
app/src/main/res/drawable/ic_check_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
||||
</vector>
|
||||
65
app/src/main/res/layout/pref_account_switcher.xml
Normal file
65
app/src/main/res/layout/pref_account_switcher.xml
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/profile_pic"
|
||||
android:layout_width="@dimen/image_size_40"
|
||||
android:layout_height="@dimen/image_size_40"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundAsCircle="true" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/full_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/username"
|
||||
app:layout_constraintEnd_toStartOf="@id/arrow_down"
|
||||
app:layout_constraintStart_toEndOf="@id/profile_pic"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="full name" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/username"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingRight="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/arrow_down"
|
||||
app:layout_constraintStart_toEndOf="@id/profile_pic"
|
||||
app:layout_constraintTop_toBottomOf="@id/full_name"
|
||||
tools:text="\@username" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/arrow_down"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/full_name"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_arrow_drop_down_24"
|
||||
app:tint="?colorAccent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -109,7 +109,6 @@
|
|||
</string-array>
|
||||
<array name="logged_out_main_nav_ids">
|
||||
<item>@navigation/profile_nav_graph</item>
|
||||
<item>@navigation/discover_nav_graph</item>
|
||||
<item>@navigation/more_nav_graph</item>
|
||||
</array>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<dimen name="private_page_margins">@dimen/profile_picture_size</dimen>
|
||||
|
||||
<dimen name="profile_picture_size">90dp</dimen>
|
||||
<dimen name="image_size_40">40dp</dimen>
|
||||
<dimen name="feed_profile_size">48dp</dimen>
|
||||
<dimen name="slider_item_size">80dp</dimen>
|
||||
<dimen name="highlight_size">70dp</dimen>
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
<string name="story_mentions">Mentions</string>
|
||||
<string name="priv_acc">This Account is Private</string>
|
||||
<string name="priv_acc_confirm">You won\'t be able to access posts after unfollowing! Are you sure?</string>
|
||||
<string name="no_acc">You can log in via Settings on the bottom-right corner. Or, you can view public accounts without login!</string>
|
||||
<string name="no_acc">You can log in via More -> Account on the bottom-right corner or you can view public accounts without login!</string>
|
||||
<string name="no_acc_logged_in">You can swipe left/right for explore/feed, or search something below!</string>
|
||||
<string name="empty_acc">This Account has No Posts</string>
|
||||
<string name="empty_list">No Such Posts!</string>
|
||||
|
|
@ -258,4 +258,5 @@
|
|||
<string name="pref_category_theme">Theme</string>
|
||||
<string name="pref_category_downloads">Downloads</string>
|
||||
<string name="pref_category_locale">Locale</string>
|
||||
<string name="add_account">Add account</string>
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue