android-support-design

Android CollapsingToolbarLayout Title background

妖精的绣舞 提交于 2019-11-28 15:58:27
I'm working with the CollapsingToolbarLayout from the new Android Design Support Library. I have set its title and it is working fine, the only problem I still have is that when you scroll, the text is lost, depending on the image in the background. What I'd like to do, is set a background to the CollapsingToolbarLayout title, but I haven't find a way to do it. Is there anyway to achieve this? Thanks! Layout: <android.support.design.widget.CoordinatorLayout android:id="@+id/main_content" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res

Whitespace below CoordinatorLayout in DrawerLayout

巧了我就是萌 提交于 2019-11-28 07:20:24
问题 I am trying to implement a layout with a CollapsingToolbarLayout inside a DrawerLayout . The whole acitivty_main.xml looks like this: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/activity_main__drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- The CoordinatorLayout is used to coordinate (rly) scroll events between different

Using TabLayout inside a Fragment; tab text invisible

夙愿已清 提交于 2019-11-28 05:01:18
I'm currently experimenting with various new components in the new Android Support Design library . I've implemented a NavigationView in my MainActivity.java , which uses a FragmentManager to navigate between the items in the Navigation drawer: getSupportFragmentManager() .beginTransaction() .replace(R.id.content, mTabLayoutFragment) .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) .commit(); I'm using a TabLayout in one of the fragments. Here is the fragment's layout: <android.support.design.widget.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=

Changing RadioButton color on API 19 and below?

为君一笑 提交于 2019-11-28 02:06:31
So I have an app in which the user can select a color by choosing from a set of RadioButtons , I have used the ButtonTint XML attribute to color the buttons, but obviously this only works on API > 21 /. so my question is, how to change the color of the RadioButtons on KitKat(API 19) and below? I have tested a few methods from other stack overflow questions, but so far none have worked. Use design support library (23.2.0 OR latest) and appcompatwidgets as below Material Design for Pre-Lollipop Devices : AppCompat (aka ActionBarCompat) started out as a backport of the Android 4.0 ActionBar API

Android Bottom Navigation Bar with drop shadow

三世轮回 提交于 2019-11-27 21:20:54
I'm implementing Bottom Navigation Bar in Android app using Google's support design library v25.1.0 . Is there any way to add drop shadow effect, same as current Android native Google Photos app? You can draw your own shadow just above the bottom bar using simple View and its background: <View android:layout_width="match_parent" android:layout_height="4dp" android:layout_above="@id/bottom_bar" android:background="@drawable/shadow"/> drawable/shadow.xml: <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#1F000000" android:endColor="@android:color

Design support library - Which version to use with SDK v21

不羁岁月 提交于 2019-11-27 20:08:28
I have problems to understand the version scheme of the support libraries and when to use which version. Currently I have a project with compileSdkVersion 21 , minSdkVersion 21 and targetSdkVersion 21 and want to use the android design support library. When I use com.android.support:design:22.2.0 the project compiles but I get a Gradle warning: "This support library should not use a different version (22) than the `compileSdkVersion` (21)". When I use com.android.support:design:23.0.1 I get some compilation errors like: "Error:(2) Error retrieving parent for item: No resource found that

Android KitKat: android.view.InflateException: Error inflating class android.support.design.widget.NavigationView

时光总嘲笑我的痴心妄想 提交于 2019-11-27 18:45:56
问题 Below is my configuration. This works on Android Lollipop but crash on Android Kitkat. I tried every workaround here but can't help: Error inflating class android.support.design.widget.NavigationView build.gradle android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { minSdkVersion 14 targetSdkVersion 23 // Support RenderScript Library v8 renderscriptTargetApi 18 renderscriptSupportModeEnabled true } } ext{ supportLibVersion = '23.1.1' } dependencies { compile fileTree(dir:

Set state of BottomSheetDialogFragment to expanded

Deadly 提交于 2019-11-27 17:41:15
How do you set the state of a fragment extending BottomSheetDialogFragment to expanded using BottomSheetBehavior#setState(STATE_EXPANDED) using the Android Support Design Library (v23.2.1)? https://code.google.com/p/android/issues/detail?id=202396 says: Bottom sheets are set to STATE_COLLAPSED at first. Call BottomSheetBehavior#setState(STATE_EXPANDED) if you want to expand it. Note that you cannot call the method before view layouts. The suggested practice requires a view to be inflated first, but I'm not sure how I'll set the BottomSheetBehaviour onto a fragment ( BottomSheetDialogFragment )

Error inflating class android.support.design.widget.TabLayout

我怕爱的太早我们不能终老 提交于 2019-11-27 15:08:11
I'm trying to create a menu tab based on Google's "material design" using Eclipse, but I got an error: Error inflating class android.support.design.widget.TabLayout Log file: 07-30 00:52:40.588: E/Trace(31652): error opening trace file: No such file or directory (2) 07-30 00:52:40.672: E/AndroidRuntime(31652): FATAL EXCEPTION: main 07-30 00:52:40.672: E/AndroidRuntime(31652): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.mykitchen/com.app.mykitchen.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.design

How to put RelativeLayout inside CoordinatorLayout

蹲街弑〆低调 提交于 2019-11-27 14:36:16
问题 I'm trying to recreate the search box as it is in Airbnb Android app. So I'm using CoorinatorLayout with Toolbar and RecyclerView . But when I insert something inside the Coordinator besides those two things, it doesn't show up. Here is my code: <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/slidingLayout" android:layout_width="match_parent" android:layout_height=