android-design-library

Edittext color is white in appcompat 22.2

…衆ロ難τιáo~ 提交于 2019-11-30 23:57:29
EDIT 2 : This is happening because of the line <item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item> in styles.xml . I'm using this to display light color (white) texts and back home button in ToolBar . If i change this to <item name="theme">@style/ThemeOverlay.AppCompat.Light</item> then EditText is working as expected but my ToolBar text and back home button colors are changes to dark (black). As I'm using dark colored ToolBar I would like to show the text and back home button in light (white) color. I tried using <item name="android:theme">...</item> instead of <item name=

Programmatically show Toolbar after hidden by scrolling (Android Design Library)

偶尔善良 提交于 2019-11-30 23:47:36
问题 I have the following layout: a drawer, with the main content view having a AppBarLayout, RecyclerView and a TextView. When I scroll the recycler, the toolbar is correctly hidden. However, I have a use case: when all items from the recycler are removed, I sets its visibility to 'gone' and a TextView with an appropriate message it shown instead. If this is done while the toolbar is hidden, it is not possible for the user to see the toolbar again. Is it possible to programmatically cause the

TabLayout selected tab gravity

有些话、适合烂在心里 提交于 2019-11-30 22:38:20
问题 TabLayout is set up with ViewPager , has a lot of tabs, MODE_SCROLLABLE and keyline app:tabContentStart="72dp" . When user selects a tab, TabLayout tries to scroll the selected tab to the center. I would like the selected tab to be left aligned to keyline, not centered. Is it possible? Android Design Support Library v22.2.0. 回答1: Unfortunately the method calculateScrollXForTab() of TabLayout is private and then not replaceable by subclasses. Either way you can copy the source TabLayout in

CoordinatorLayout layout_anchor does not work

无人久伴 提交于 2019-11-30 22:34:56
问题 I just tried out the new Support Design Library with CoordinatorLayout, but I'm having problems anchoring child views. My layout currently looks like this: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/coordinator_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar"

Elevation on AppBarLayout doesn't work

亡梦爱人 提交于 2019-11-30 22:19:34
When I try to set a specific value to elevation for AppBarLayout, the shadow disappears completely. <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:elevation="4dp"> <!-- Toolbar --> <android.support.v7.widget.Toolbar... <!-- Other Layouts --> </android.support.design.widget.AppBarLayout> Is this a bug or the expected behaviour? I'm using the version 26.0.0 of the design library. Setting Property Animation Creating an animation with 1ms of execution time: /animator/appbar_elevation.xml <?xml version="1.0" encoding="utf-8"?

CollapsingToolbarLayout with a ViewPager

和自甴很熟 提交于 2019-11-30 20:33:21
I'm trying to use the CollapsingToolbarLayout to have a collapsible toolbar with a ViewPager that fades away while scrolling up but I seem to lose the ability to scroll up if the ViewPager is present. The ViewPager is supposed to show multiple images in the Toolbar. Here's the XML: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget.AppBarLayout

What is the best way to implement material design in pre-lollipop devices? [closed]

岁酱吖の 提交于 2019-11-30 20:16:55
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . I have to make my app fully in material design. It should support pre-lollipop devices as well. I tried with one support library found here. It works fine, but seems to be slow in effects like ripple effects. In some articles, I found we can use compile "com.android.support

Elevation on AppBarLayout doesn't work

走远了吗. 提交于 2019-11-30 17:55:14
问题 When I try to set a specific value to elevation for AppBarLayout, the shadow disappears completely. <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:elevation="4dp"> <!-- Toolbar --> <android.support.v7.widget.Toolbar... <!-- Other Layouts --> </android.support.design.widget.AppBarLayout> Is this a bug or the expected behaviour? I'm using the version 26.0.0 of the design library. 回答1: Setting Property Animation Creating

CollapsingToolbarLayout setTitle() not working anymore

人走茶凉 提交于 2019-11-30 17:46:54
The setTitle() method from CollapsingToolbarLayout had some bugs already (like showing only after a scroll, fixed in v22.2.1 ). Today I updated to v23.0.0 , and it is simply not working, like no title is shown. By calling it multiple times with a delay, I can see that sometimes the title is there, but it is really not reliable (like, you switch to another fragment, then back to the first, and there's no title anymore). I found there's a new attribute, app:titleEnabled or CollapsingToolbarLayout.setTitleEnabled(boolean) . I have set both to true, but it doesn't change anything actually. Is any

Android Design Support Library TabLayout using custom tabs layout but layout wrapping the tabs

跟風遠走 提交于 2019-11-30 17:35:19
In tab custom layout I set its parent element to match_parent and set its background color. When I run it tabs are shown custom layout wrapping the elements imageview and textview. I want this custom layout will fill the tab without any space between tabs. Check output here: private void setupTabLayout(ViewPager viewPager, ViewPagerAdapter viewPagerAdapter) { TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout); tabLayout.setupWithViewPager(viewPager); int length = tabLayout.getTabCount(); for (int i = 0; i < length; i++) { tabLayout.getTabAt(i).setCustomView(viewPagerAdapter