xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:orientation="vertical">
<android.support.v7.widget.Toolbar android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_alizarin"
android:titleTextAppearance="@color/White"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- **** Place Your Content Here **** -->
<View android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/toolbar_dropshadow"/>
</FrameLayout>
@drawable/toolbar_dropshadow
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="@android:color/transparent"
android:endColor="#88333333"
android:angle="90"/>
</shape>
@color/color_alizarin
<color name="color_alizarin">#e74c3c</color>
출처: https://stackoverflow.com/questions/26575197/no-shadow-by-default-on-toolbar
'Study > Android' 카테고리의 다른 글
[Android] 페이스북 로그인 연동 에러-Invalid-key-hash (0) | 2019.06.12 |
---|---|
[Android] KEY_CODE 표 (0) | 2019.06.12 |
[android] R.id 의 값 동적으로 가져오기 (0) | 2019.06.12 |
[Android] 갤러리, 사진촬영, CircularImageView (0) | 2019.06.12 |
[Android] shape xml (0) | 2019.06.10 |