android-elevation

Material TabLayout elevation not working

99封情书 提交于 2019-11-30 04:16:39
For some reason the elevation attribute does not seem to be working on the new TabLayout in the material design support library. Any ideas? XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.TabLayout android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:elevation="6dp" /> <android.support.v4.view.ViewPager android:id="@+id/view

Changing CardView shadow color

痴心易碎 提交于 2019-11-30 01:02:27
This question was asked on SO many times, but still I didn't find a good solution for this problem. Why do I need this to do? Well because project me and my team develops has iOS style. What did I try? 9.pathch shadow generator but 9.pathes are essentially pngs and it gives me no flexibility and if I'll use this approach I should edit margins everywhere. Carbon library it supports custom shadows and they get drawn outside of view borders, but there is issue regarding rounded rectangles, when library doesn't draw shadow for rounded corners. using old CardView implementation and overriding its

How to add bottom shadow to tab layout or Toolbar in android

♀尐吖头ヾ 提交于 2019-11-29 13:29:21
Hi i need add shadow under my tab layout (like in skype). My activity xml: <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.Toolbar xmlns:local="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" android:background="@color/splashGreenTop" local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" local:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> <android.support.design.widget.TabLayout

Material TabLayout elevation not working

元气小坏坏 提交于 2019-11-29 01:31:54
问题 For some reason the elevation attribute does not seem to be working on the new TabLayout in the material design support library. Any ideas? XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.TabLayout android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="?attr

“android:elevation=” doesn't work on devices pre-Lollipop with compile API21

此生再无相见时 提交于 2019-11-28 21:06:08
I'm trying to use "android: elevation =" in my application but once I run it does not appear in the device with android 4.1.2 gradle apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.alvaro.proyectocaronte" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support

android:elevation only have shadow effects on the bottom side, how to make the shadow effects show on top side?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 18:15:50
I use a framelayout at the bottom of an activity, in order to show the shadow effects on the fragment, I add android:elevation. But the shadow effects only appear in the bottom side not on top side, any one could give me some advice? <FrameLayout android:id="@+id/bottom_container" android:background="#00737f" android:layout_width="match_parent" android:layout_height="50dp" android:layout_gravity="bottom" android:elevation="4dp" android:layout_alignParentBottom="true" android:layout_marginBottom="50dp"/> There is a trick that can be used to display a shadow above a View. Basically we have to

Setting Elevation in XML on AppCompat CardView on Android 5.0

 ̄綄美尐妖づ 提交于 2019-11-28 15:56:15
From what I understand, early in the preview stage there seemed to be no way to set elevation in XML only on CardView s without a hack in Java. Now that the official release is out, is there any way of doing this in XML without writing Java code to set elevation? I have tried card_view:cardElevation to no effect. I had thought when I was using the emulators for 5.0 everything was fine. But now that I'm using the official version on my actual device all of my CardView s disappeared Pre Lollipop, it works great. Here is my full xml <?xml version="1.0" encoding="utf-8"?> <android.support.v7

How to show the shadow of the ActionBar&Toolbar of the support library on all Android versions?

送分小仙女□ 提交于 2019-11-28 06:00:51
This is a simple question: I use the new support library, which allows me to have a Toolbar instance and even set it as the actionBar of the activity (or use the default one). How do I customize the shadow being cast by the Toolbar (or the default ActionBar) ? I've tried to use "setElevation" (on both of them), but it didn't seem to do anything on Android Lollipop. Also, I can't find how to customize the shadow on pre-Lollipop versions. Is there maybe an API for this? or at least a drawable (I didn't find, even though I've tried) ? OK, I've managed to find the next things: For both Lollipop

“android:elevation=” doesn't work on devices pre-Lollipop with compile API21

可紊 提交于 2019-11-27 13:28:16
问题 I'm trying to use "android: elevation =" in my application but once I run it does not appear in the device with android 4.1.2 gradle apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.alvaro.proyectocaronte" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' }

android:elevation only have shadow effects on the bottom side, how to make the shadow effects show on top side?

故事扮演 提交于 2019-11-27 11:09:30
问题 I use a framelayout at the bottom of an activity, in order to show the shadow effects on the fragment, I add android:elevation. But the shadow effects only appear in the bottom side not on top side, any one could give me some advice? <FrameLayout android:id="@+id/bottom_container" android:background="#00737f" android:layout_width="match_parent" android:layout_height="50dp" android:layout_gravity="bottom" android:elevation="4dp" android:layout_alignParentBottom="true" android:layout