825
questions
0
votes
0
answers
28
views
Android CollapsingToolbar not collapsing in some cases
I have a problem with CollapsingToolbarLayout not collapsing in some cases only. The report came only from one user with a Samsung Galaxy A53. We tried reproducing it in other Samsung & Xiaomi ...
0
votes
0
answers
18
views
How to scroll 1st and 3rd elements keeping the 2nd/middle one visible (CordinatorLayout + AppBarLayout)
I'm pretty new on Android Development, so sorry in advance if I'm asking is something super basic.
I'm creating an app that has 3 components/bars stacked on top of each other, and a list below. What I ...
0
votes
0
answers
18
views
MaterialToolbar breaks TabLayout scroll
I've recently updated my app to Material3 and replaced the ActionBars in my app with MaterialToolbars. My app has a ViewPager2 where each Fragment in the pager has a RecyclerView. Previously, ...
1
vote
0
answers
27
views
Why is AppBarLayout's elevation changing when a preference is selected?
I only added a PreferenceScreen to Android Studio's Basic Views Activity template, and I don't know why the AppBarLayout flashes when a preference is clicked
This is not the behavior of any other ...
0
votes
0
answers
26
views
Recyclerview contents overlap scrolling Appbar after implementing SwipeRefreshLayout
I have a recyclerview with scrolling appbar, everything work as expected until swiperefresh layout is implemented. The contents of recyclerview overlap appbar as the image below. don't know what is ...
0
votes
0
answers
72
views
Fix Android layout after change to androidx.core:core:1.12.0
I have a RecyclerView list of cardviews and recently Android Studio recommended an update to "implementation 'androidx.core:core:1.12.0'" from 1.10.1.
A layout issue then appeared in Studio:...
0
votes
1
answer
48
views
How to make vertical list navigation on andoid?
Can you please tell me how to implement this behavior? Under AppBar has a horizontal menu that allows you to go to the desired category, list location, and it is also automatically selected when ...
0
votes
1
answer
89
views
How to Get AppBarHeight from AppBar.kt in Compose Android
I want to get this value in AppBar.kt
private val AppBarHeight = 56.dp
I'm using the TopAppBar in a Scaffold and need to know its height, how can I retrieve this value without hard-coding it where I ...
1
vote
1
answer
445
views
Android Jetpack Compose with Material 3 - Is there a way to automatically collapse action items to the overflow menu?
The official docs for a Material 3 TopAppBar say:
When there are more than three interactive icons, the less important ones can be collapsed into an overflow menu. The overflow menu then takes the ...
0
votes
1
answer
51
views
CoordinatorLayout + scrollFlags in fragments not properly hiding menu and breaking other fragments when it does, FAB gets lost when scrolling too
I've started a new project. I'd read that single Activity, and a number of fragments was a common recommended approach. I have a MainActivity, and 3 fragments. This setup is just from the "...
0
votes
1
answer
418
views
Inside a CoordinatorLayout with AppBarLayout, how to set ScrollView or RecyclerView above an EditText that is fixed to bottom?
I need to use a RecyclerView inside a CoordinatorLayout with AppBarLayout. Below AppBarLayout, I have a RecyclerView. But, I would also like to fix a LinearLayout at the bottom of screen. The ...
0
votes
1
answer
60
views
Enable snap scrolling in colloapsing toolbar layout only when scrolling upwards
I am trying to enable snap scrolling in collapsing toolbar in app bar layout only when scroll direction is upwards. Like scrolling up 50% of the app bar content should expand or collapse the toolbar. ...
0
votes
1
answer
230
views
Weird AppBarLayout and SwipeRefreshLayout Behavior in Material 3
I'm creating an app that has swipe-to-refresh feature with Material 3 (Material You) design. But when scrolling the content under the SwipeRefreshLayout, the app bar doesn't lift properly as expected. ...
0
votes
1
answer
878
views
How to display content over topBar in Compose UI
Hi I want to achieve that the content should overlap the topbar. In XML I was using elevation and negative padding and it worked fine. I am struggling to do this in Compose UI.
What I have so far.
...
0
votes
1
answer
63
views
Why do I lose data by switching fragments in a Kotlin app?
I am programming a basic shop app (I am a beginner). It has a default bottom bar. In the home fragment, there is a recyclerview implemented with a product adapter to display products from a ...
0
votes
1
answer
443
views
Android - CollapsingToolbarLayout with AppBarLayout (custom toolbar layout)
Is it possible to obtain the following effect?
I have a Toolbar with custom layout as below (wrapped with AppBarLayout for shadow effect) and a RecyclerView below.
When the screen is opened, the title ...
0
votes
1
answer
99
views
Center TextField in MediumTopAppBar title
WHAT I AM TRYING TO DO: I am trying to use a TextField inside the title of MediumTopAppBar.
THE PROBLEM: The TextField looks like it's been cut off from the top.
MY CODE
Scaffold(
topBar = {
...
0
votes
1
answer
407
views
Android sticky CollapsingToolbarLayout in AppBarLayout
I want to add a behaviour to my CollapsingToolbarLayout such that the "collapsible" content is sticky (image) in this case. Only the bottom sheet needs to be scrollable and it will overlay ...
0
votes
0
answers
174
views
Child fragment menu gets carried over to other parent fragments from BottomNavigationView
Some context:
I have an app with a single Activity: MainActivity.kt
MainActivity.kt has a BottomNavigationView, which hosts 3 top destination fragments:
1st Fragment: TodayFragment.kt
2nd Fragment: ...
1
vote
2
answers
627
views
How to make a translucent toolbar in android?
How to make a translucent/transparent toolbar in android so that views behind that would be visible while scrolling up?
Whatever goes behind this toolbar it should reflect on it.
Here is my toolbar ...
1
vote
1
answer
189
views
Prominent app bar with image appears behind status bar
I am using a prominent app bar with an image in a fragment.
My style and xml files look like this:
theme.xml:
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- ...
0
votes
1
answer
165
views
AppBar with Fragments and Bottom Navigation Bar
Not sure if I'm fighting an uphill battle but I'm currently struggling with AppBar, Fragments and Bottom Navigation Bars.
I have a MainActivity that's a list view with an AppBar. It's created as a ...
12
votes
3
answers
2k
views
Flutter/Material 3: AppBar ignores icon themes
In my AppBar the title is displayed with white text, but the icons are a dark grey or something.
I Would like to have the icons white, too.
But the colors in the icon themes have no effect!
Not when ...
2
votes
1
answer
435
views
Can`t align Android Material 3 Toolbar title start|center_vertical
I want to have Toolbar title gravity start|center_vertical
Expected result :
expected
But actual result is :
actual
Steps to reproduce:
I'm creating View class and extending MaterialToolbar
class ...
0
votes
0
answers
212
views
Android design - appbarlayout with recycleView in FragmentContainerView
I have layout with AppBarLayout, and FragmentContainerView which might include horizontal and vertical recycleView inside it which all of them need to be scroll up and down
I don't want to Use ...
0
votes
1
answer
297
views
How to make Toolbar and TabLayout still visible even when CollapsingToolbarLayout is collapsed?
How to make Toolbar and TabLayout still visible even when CollapsingToolbarLayout is collapsed?
For example, i have a CollapsingToolbarLayout with app:contentScrim animation that contains a Toolbar, ...
0
votes
0
answers
122
views
Custom Options Menu item does not trigger `onOptionsItemSelected` when clicked
In my top AppBar options menu I needed an custom menu item, so I defined it like so in my Fragment:
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
menu.add(Menu.NONE, 0,...
8
votes
1
answer
17k
views
How to create a TopAppBar in compose?
I am currently trying to create a seperate composable for the TopAppBar. I am going for something like this: https://gyazo.com/029064b4fb4169c5171a85934fcdcc7a. I want to be able to customize it ...
6
votes
2
answers
1k
views
AppBarLayout with scrolling behavior alternative/ sticky view on scrolling/ large height AppBarLayout causing weird scroll
Video of my current state,for better understanding of my situation:
video
everything above RecyclerView is inside AppbarLayout
Example of reddit app with similar behavior:
video
Goal:
1-Implement ...
1
vote
0
answers
341
views
How to set custom toolbar background in android
Hey guys I am using custom toolbar in my project. When I try to scroll view it goes behind the toolbar and see all item. I made a short video please have a look.
toolbar.xml
<?xml version="1.0&...
1
vote
1
answer
601
views
How to use Appbar with toolbar in android
Hey I am working on search bar in android. I get the lead from this post. Now I want to try something more. Above post explanation in short :- I have searchview in the middle of screen. When we focus ...
1
vote
0
answers
428
views
Issue adding "app:layout_behavior" in Constraint layout for collapsing toolbar
I am facing one issue since past few days. Below is the issue details.
I need to hide the top layout while scrolling the recyclerview, for that I am using "app:layout_behavior" in ...
2
votes
0
answers
842
views
Android 12 Splash Screen causing crash in <12 versions of Android with AppBarLayout
I set the theme of the app to the one I created that inherits from Theme.SplashScreen, which is declared in values-v31. Now when I launch my app on devices running 11 and below, I get a crash. How do ...
1
vote
0
answers
943
views
How to make Status bar and App bar layout transparent?
I'm copying the ui of the Keep Notes app and I want to make a transparent status bar and something like a search bar that hides when scrolling through the list.
First of all, I tried to make the ...
12
votes
4
answers
4k
views
Material Design 3 Top app bar does not have a shadow. How to enable it?
The new 'Material Design 3 top app bar' docs says they got rid of the drop shadow.
How can I enable it? Setting elevation on Toolbar or AppBar does not work at all.
1
vote
1
answer
1k
views
CollapsingToolbar with second toolbar instead of ImageView
I am trying to create an app with two toolbars on top and a specific collapsing/expanding behaviour on scrolling. See the mockup to get a deeper understanding of what I'm trying to achieve:
I already ...
0
votes
1
answer
130
views
AppBarLayout scroll when edit text in EditText
My xml layout:
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_height="match_parent"
android:layout_width="match_parent">
<com.google....
0
votes
1
answer
249
views
How do I constraint my widgets to the parent view and to one another to ensure they are aligned as a whole?
My widgets appear to be perfectly aligned in the DESIGN display of android studio, however when I run my app, its appearance differs on the emulator. Only the two pair of widgets (a pair consisting of ...
1
vote
1
answer
638
views
Android CoordinatorLayout with AppbarLayout Double Fling Bug
AppbarLayout has a big child, so we can drag and fling it.
It goes wrong when I fling appbar with its child first and fling scrollview before previous fling animation is finished.
The scrolling then ...
0
votes
1
answer
83
views
Up Arrow disabled on implementing App Bar with overflow menu
I am developing a sport timer app and new to android programming. I have implemented overflow menu. I am facing two issues:
Facing disappearing Up Arrow that is needed for navigation up in the ...
0
votes
1
answer
79
views
set different title bar to collapsingToolbarLayout
i have one activity that handle on multiple list fragment with viewPager, once i clicked the item, i wish the result have a different title on the appbarr .
Here's my code, it's work for me, but i ...
0
votes
1
answer
112
views
Search feature in AppBar causes Exception
I am trying to implement a search feature in my app bar but keep getting this exception. I have no idea what is wrong here. Everything works fine if I remove TextFormField or if I use any other widget ...
1
vote
1
answer
1k
views
Android CoordinatorLayout Trigger Hide-Bottom-on-Scroll Behavior Programmatically
My setup like this:
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
android:layout_width="match_parent"
android:...
0
votes
1
answer
181
views
How to insert an image between a Toolbar and a TabLayout?
I would like to insert an image(the blue imageView) in my AppBarLayout between a Toolbar and a TabLayout. The TabLayout should always be displayed and the Toolbar when you scroll up. The image should ...
11
votes
3
answers
5k
views
How to reduce horizontal space between navigation icon and title in a jetpack compose `TopAppBar`?
I'm making an app bar in jetpack compose but I'm having spacing issues between the navigation icon and the title.
This is my compose function:
@Composable
fun DetailsAppBar(coin: Coin, backAction: () -...
-1
votes
1
answer
150
views
nestedScrollingEnabled not working in AppBarLayout
I have a horizontal recyclerview inside the AppBarLayout, which is inside the CoordinatorLayout, which is inside the SwipeRefreshLayout. I want that when I move horizontally in recyclerview it can't ...
1
vote
1
answer
628
views
Single activity: fragment with AppBarLayout
I have a fragment with a RecyclerView in it. When clicking on an item, I'm navigating (with navigation component) to a detail fragment.
Inside the detail fragment, I want to implement the AppBarLayout....
0
votes
1
answer
310
views
How to make CollapsingToolbarLayout disappear completely after scrolling?
I'm trying to make a fragment "head" with two toolbars and horizontal scroll view between them. I want to make horizontal scroll view completely disappear after scrolling down but after ...
0
votes
0
answers
467
views
Android How to fix bottom of UI, cut off by AppBarLayout$ScrollingViewBehavior
I am using CoordinatorLayout for my activity_main layout, to show a RecyclerView list of CardViews. All works well except when there are no CardViews...an empty list. When I add "app:...
4
votes
1
answer
2k
views
elements going behind status bar and bottom navigation bar
bottom navigation view is going behind bottom nav bar and the toolbar is going behind the status bar
I am new to android and I have been stuck with this issue from day one. I have tried to set ...