androiddesignsupport

Android Tab Layout not taking up full width with custom view

喜你入骨 提交于 2019-12-09 05:52:48
问题 Android TabLayout tabPaddingTop and tabPaddingBottom not being removed Please refer to the above issue as well. Even since i updated my design library to "23.2.0", Tab layout is all messed up. The below image is my Tab Layout. Xml Part :- <android.support.design.widget.TabLayout android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabIndicatorColor="@android:color/white" app:tabIndicatorHeight="@dimen/dp2" app:tabMode="fixed" app

Navigation Drawer statusbar

我怕爱的太早我们不能终老 提交于 2019-12-09 04:30:32
I'm having trouble making Navigation drawer over statusbar . I'm using new Design support library. In blogspot thay said: NavigationView takes care of the scrim protection of the status bar for you, ensuring that your NavigationView interacts with the status bar appropriately on API21+ devices. But it has no documentation so I'm very confused how to use Drawer to achieve desired effect. I tried inserting following attributes in my styles-v21: <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">@android:color/transparent</item> after this

Disable Tabs in TabLayout

独自空忆成欢 提交于 2019-12-08 18:37:46
问题 I have used TabLayout from the latest design support library in my app. The tabs are attached to a viewpager which loads the fragments for each tab. I want to disable all the tabs until the viewpager loads the fragment for user selected tab. I am not able to disable the tablayout or make it non-clickable. I had used setEnabled(false) and setClickable(false) but it is not working. I am able to make it invisible by using setVisiblity(View.GONE) but I want the tabs to be visible at all times.

CollapsingToolbarLayout & NestedScrollView don't work together

南楼画角 提交于 2019-12-08 10:28:19
问题 I'm trying to make CollapsingToolbarLayout work with NestedScrollView , but it doesn't follow the scrolling of NestedScrollView correctly. It moves a little bit when the NestedScrollView reaches the top or bottom end, but that's clearly not the intended behavior. Oh, and the contentScrim covers the ImageView immediately as well. Here's a video of what happens: https://youtu.be/1GlTJq5fd0U And here's the xml: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas

Navigation Drawer statusbar

て烟熏妆下的殇ゞ 提交于 2019-12-08 05:18:45
问题 I'm having trouble making Navigation drawer over statusbar . I'm using new Design support library. In blogspot thay said: NavigationView takes care of the scrim protection of the status bar for you, ensuring that your NavigationView interacts with the status bar appropriately on API21+ devices. But it has no documentation so I'm very confused how to use Drawer to achieve desired effect. I tried inserting following attributes in my styles-v21: <item name="android

CollapsingToolbarLayout crash

泄露秘密 提交于 2019-12-08 03:24:07
问题 I have a RecyclerView that triggers a CollapsingToolbarLayout and when I try and reopen the collapsed toolbar on 4.2.2 I get the crash below. Any ideas? java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:638) at android.graphics.Bitmap.createBitmap(Bitmap.java:620) at android.support.design.widget.CollapsingTextHelper.ensureExpandedTexture(CollapsingTextHelper.java:405) at android.support.design.widget.CollapsingTextHelper

findViewById(R.id.icon) returns null

有些话、适合烂在心里 提交于 2019-12-06 15:18:43
问题 R.id.icon is already defined in Android API level 1. However, I am getting an NPE in a Android Design Support Library internal code while accessing an imageview inflated using R.id.icon . NOTE: I am not targetting Oreo as my targetSdk is currently 25 . Here is the stacktrace: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.widget.ImageView.getLayoutParams()' on a null object reference at android.support.design.internal

“Hidden” Toolbar visible under status bar

删除回忆录丶 提交于 2019-12-06 04:46:36
问题 Using the CoordinatorLayout to hide my toolbar when scrolling down. The toolbar thinks it's hidden - But it's not. Does anyone understand why this is happening? Note: I have the status bar set to translucent to have proper material drawers. Making the status bar a solid color is not the solution I'm looking for - Unless of course that is how this was intended to be used. 回答1: I try to set statusbar color as the primarydark, then statusbar can not be transparent when drawer is opened otherwise

RecyclerView drawing offscreen, can't scroll bottom item into view

给你一囗甜甜゛ 提交于 2019-12-06 02:00:22
Using Design Support Library 22.2.1, with the following View hierarchy: <DrawerLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <Toolbar android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" /> <TabLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:clipToPadding="false" app:tabGravity="fill

remove or hide header navigationView in android

拟墨画扇 提交于 2019-12-05 08:32:44
i am using design 23.1.1 in my project. i want drawer without header. just menu items are enough. i dont add any header view(programmatically or in XML). but in drawer i have empty header. please help me how to remove this empty header. <android.support.design.widget.NavigationView android:id="@+id/navigation_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="right" app:menu="@menu/drawer" /> View headerView= LayoutInflater.from(this).inflate(R.layout.drawer_header, null); navigationView.addHeaderView(headerView); navigationView.getHeaderView