android-design-library

CoordinatorLayout not working

两盒软妹~` 提交于 2019-12-05 01:31:15
I am attempting to implement a CoordinatorLayout from the newly announced Android Design Support Library and I have used the following code in my XML layout as per the sample here : <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/main_content" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android

How to use Android AppBarLayout, Toolbar and TabLayout with fragments

烂漫一生 提交于 2019-12-05 01:12:51
问题 I have activity with NavigationDrawer and AppBarLayout with Toolbar. Unfortunately when I am using TabLayout in child fragment I see shadow between toolbar and TabLayout. Is it possible display shadow below TabLayout only? I do not want to move TabLayout to my activity because I'm using it only in one fragment. I can see few solutions for this problem: disable elevation on Toolbar & TabLaout ( don't like it) remove toolbar from activity and move it into fragment Do you have any ideas how to

AutoCompleteTextView strange behaviour in LolliPop Device

假装没事ソ 提交于 2019-12-04 20:47:33
问题 I am using AutoCompleteTextView in my layout. But it's colorControlNormal and Activate is not Working as I expected. My Color value is #0072BA . Below is figure for Different Device. 1.) Android Kitkat 2.) Android LolliPop 3.) Android Marshmallow Xml code that i used is below <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="@color/md_black_1000" android:layout_marginTop="5dp" android:textSize="15sp" android:text="Medical Store Name" android

Android TabLayout does not display contents anymore as soon as fragment is switched

落花浮王杯 提交于 2019-12-04 19:17:33
问题 I am using a navigation drawer in my project, with 5 fragments in it. In one fragment I have the in the design support library introduced TabLayout, which includes 2 Fragments. All works fine, except when I leave the fragment which has the TabLayout and switch back to it, all the content is gone. In each fragment in the TabLayout I have a SwipeRefreshLayout with a ListView in it, they both don't display anything upon switch. I also noticed the TabLayout starts acting strange. by strange I

Android shared element transition between two activities does not work

≡放荡痞女 提交于 2019-12-04 15:47:07
问题 In my app I'm trying to use the newly introduced element sharing between activities. Everything works like a charm if the shared element is with fixed position (e.g. android:layout_gravity="top" ) but the problem comes when the view is anchored. My first activity looks like this: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/tools" xmlns:auto="http://schemas.android.com/apk/res-auto" android

Material Design: Add circular reveal animation while switching between toolbars

好久不见. 提交于 2019-12-04 14:08:24
问题 I was reading the "Selection" section in material design guidelines (https://material.io/guidelines/patterns/selection.html), and one effect i wanted to add in my app was the circular reveal animation while switching between the app bar and the ActionMode ? An other toolbar ? Here is an example from the guidelines: https://storage.googleapis.com/material-design/publish/material_v_10/assets/0Bwp7jtSjaW36RGF3eUFsRkdqU1U/patterns_selection_item_controlling_desktop_click.webm I didn't found any

How to recreate Android quick settings sliding panel?

余生长醉 提交于 2019-12-04 14:07:15
问题 In my app I want to recreate something that is very similar to the Lollipop+ quick settings panel that everyone knows. That is: by clicking or dragging the header, I want a panel to slide down from below the header and push down the existing content . Applied to my app now, the header is a Toolbar and the main content is a RecyclerView showing a list of blog posts. By clicking or dragging the Toolbar, I'd like a panel to appear to show some stats about the blog. Like so: I have been messing

Switch in Navigation drawer item with Design Support Library on Android

。_饼干妹妹 提交于 2019-12-04 11:22:24
问题 I need to put Switch inside item in navigation drawer. I'm using new design support library, but I cannot find if it is posibble at all. When using android:checkable item is just full selected and that is not what I wish. This is screenshot of what I really want. Is that possible to achieve that? 回答1: Your menu item for the navigation drawer: <item android:id="@+id/nav_item1" android:icon="@drawable/ic_item1" android:title="item1" app:actionLayout="@layout/layout_switch" /> and the layout for

CollapsingToolbarLayout ImageView is not scrollable

偶尔善良 提交于 2019-12-04 09:33:58
问题 Using cheesesquare - android support library example is it possible to make the Header ImageView scroll-able? <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="@dimen/detail_backdrop_height" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:fitsSystemWindows="true"> <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent"

In a snackbar action, how can I be sure it's safe to permanently delete a soft-deleted record from the database?

假如想象 提交于 2019-12-04 08:57:46
问题 I am using Snackbar in android and I have implemented an action so that user can undo the action (the action is clearing all the items in the listview).Removing and adding the items back to the listview has already been done and working fine. My issue is that, items are stored in sqlite database and how can I delete the items from tables? (How can I know that the user has not clicked the undo button, so that I can completely remove the data from database). This is the code inside