mirror of
https://github.com/KokaKiwi/BarInsta
synced 2026-03-05 12:01:35 +00:00
Add search back!
This commit is contained in:
parent
48b76c231a
commit
89bb79a8fc
11 changed files with 343 additions and 78 deletions
9
app/src/main/res/drawable/ic_search_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_search_black_24dp.xml
Normal file
|
|
@ -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="#FF000000"
|
||||
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||
</vector>
|
||||
|
|
@ -25,12 +25,13 @@
|
|||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Widget.MaterialComponents.Toolbar.PrimarySurface"
|
||||
style="@style/Widget.AppTheme.Toolbar.PrimarySurface"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_collapseMode="none"
|
||||
app:popupTheme="@style/Widget.MaterialComponents.Toolbar.PrimarySurface"
|
||||
app:title="@string/app_name" />
|
||||
app:popupTheme="@style/Widget.AppTheme.Toolbar.PrimarySurface"
|
||||
app:title="@string/app_name"
|
||||
tools:menu="@menu/main_menu" />
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,52 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:foreground="?android:selectableItemBackground"
|
||||
tools:viewBindingIgnore="true"
|
||||
android:padding="2dp">
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/ivProfilePic"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter" />
|
||||
app:actualImageScaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/tvUsername"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundAsCircle="true"
|
||||
tools:src="@mipmap/ic_launcher" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginLeft="44dp"
|
||||
android:orientation="vertical">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvUsername"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvFullName"
|
||||
app:layout_constraintEnd_toStartOf="@id/isVerified"
|
||||
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="username" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvUsername"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
app:autoSizeMaxTextSize="24sp"
|
||||
app:autoSizeTextType="uniform" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvFullName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
app:autoSizeMaxTextSize="18sp"
|
||||
app:autoSizeTextType="uniform" />
|
||||
</LinearLayout>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvFullName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingRight="4dp"
|
||||
tools:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUsername"
|
||||
tools:text="full name" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/isVerified"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="end"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/verified" />
|
||||
</FrameLayout>
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/tvUsername"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvFullName"
|
||||
app:layout_constraintStart_toEndOf="@id/tvUsername"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/verified"
|
||||
tools:visibility="visible" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<!--<item-->
|
||||
<!-- android:id="@+id/favourites"-->
|
||||
<!-- android:enabled="true"-->
|
||||
|
|
@ -14,4 +15,11 @@
|
|||
<!-- android:title="@string/action_dms"-->
|
||||
<!-- app:showAsAction="always" />-->
|
||||
|
||||
<item
|
||||
android:id="@+id/search"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_search_24"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||
app:showAsAction="always|collapseActionView" />
|
||||
</menu>
|
||||
|
|
@ -16,6 +16,28 @@
|
|||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/location_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_locationFragment"
|
||||
app:destination="@id/location_nav_graph">
|
||||
<argument
|
||||
android:name="locationId"
|
||||
app:argType="string"
|
||||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/hashtag_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_hashTagFragment"
|
||||
app:destination="@id/hashtag_nav_graph">
|
||||
<argument
|
||||
android:name="hashtag"
|
||||
app:argType="string"
|
||||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/directMessagesInboxFragment"
|
||||
android:name="awais.instagrabber.fragments.directmessages.DirectMessageInboxFragment"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@
|
|||
|
||||
<style name="ThemeOverlay.App.BottomNavigationView" parent="" />
|
||||
|
||||
<style name="Widget.AppTheme.Toolbar.PrimarySurface" parent="Widget.MaterialComponents.Toolbar.PrimarySurface" />
|
||||
|
||||
<style name="ThemeOverlay.AppTheme.Dark.ActionBar" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />
|
||||
|
||||
<style name="Widget.App.ActionMode" parent="Widget.AppCompat.ActionMode">
|
||||
<item name="titleTextStyle">?attr/textAppearanceHeadline6</item>
|
||||
<item name="subtitleTextStyle">?attr/textAppearanceSubtitle1</item>
|
||||
|
|
|
|||
|
|
@ -8,13 +8,12 @@
|
|||
<item name="windowActionModeOverlay">true</item>
|
||||
<item name="actionModeStyle">@style/Widget.App.ActionMode</item>
|
||||
<item name="actionModeCloseDrawable">@drawable/ic_close_24</item>
|
||||
<item name="actionBarTheme">@style/ThemeOverlay.MaterialComponents.Dark.ActionBar</item>
|
||||
<item name="actionBarTheme">@style/ThemeOverlay.AppTheme.Dark.ActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Amoled" parent="Theme.AppCompat.NoActionBar">
|
||||
<style name="Theme.Amoled" parent="AppTheme">
|
||||
<item name="android:colorBackground">@color/background_amoled</item>
|
||||
<item name="bottomSheetDialogTheme">@style/AppTheme.BottomSheetDialog.Dark</item>
|
||||
<item name="android:windowAnimationStyle">@style/AppTheme.WindowAnimationTransition</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.BottomSheetDialog.Dark" parent="Theme.MaterialComponents.BottomSheetDialog" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue