All Projects → vipulasri → Toolbar-Elevation-Pre-Lollipop

vipulasri / Toolbar-Elevation-Pre-Lollipop

Licence: other
Toolbar Elevation on Pre-lollipop devices

Projects that are alternatives of or similar to Toolbar-Elevation-Pre-Lollipop

Alipayhome
高仿支付宝首页的头部伸缩动画(使用design实现效果,CoordinatorLayout+AppBarLayout+CollapsingToolbarLayout+Toolbar)
Stars: ✭ 164 (+192.86%)
Mutual labels:  toolbar
olturf
A Turf toolbar for OpenLayers.
Stars: ✭ 30 (-46.43%)
Mutual labels:  toolbar
Whatsapp Android App
This is sample code for layout for chatting app like Whatsapp.
Stars: ✭ 32 (-42.86%)
Mutual labels:  toolbar
Quill Emoji
Quill module toolbar extension for emoji
Stars: ✭ 175 (+212.5%)
Mutual labels:  toolbar
wui
Collection of GUI widgets for the web
Stars: ✭ 44 (-21.43%)
Mutual labels:  toolbar
MultiGame
MultiGame is a tool for rapid development in Unity
Stars: ✭ 16 (-71.43%)
Mutual labels:  toolbar
Summernote Cleaner
Plugin for Summernote that adds a Button and/or Paste functionality for cleaning MS Word Crud from editor text
Stars: ✭ 148 (+164.29%)
Mutual labels:  toolbar
MaterialSettings
The open repository with a global support for Android 5 Toolbar within any Settings Activity
Stars: ✭ 58 (+3.57%)
Mutual labels:  toolbar
SanSessionToolbar
⚡ Session Toolbar that can be applied into Zend/Laminas DeveloperTools
Stars: ✭ 39 (-30.36%)
Mutual labels:  toolbar
Switch
Manage chrome extensions from the toolbar
Stars: ✭ 13 (-76.79%)
Mutual labels:  toolbar
Everythingtoolbar
Everything integration for the Windows taskbar.
Stars: ✭ 3,706 (+6517.86%)
Mutual labels:  toolbar
Extended text field
extended official text field to quickly build special text like inline image, @somebody, custom background etc.
Stars: ✭ 250 (+346.43%)
Mutual labels:  toolbar
OpcacheBundle
Displays the PHP OPcache status in the Symfony profiler toolbar.
Stars: ✭ 21 (-62.5%)
Mutual labels:  toolbar
Frameless Titlebar
Customizable Electron Titlebar for frameless windows
Stars: ✭ 167 (+198.21%)
Mutual labels:  toolbar
tool-bar
Package providing customisable toolbar for Atom
Stars: ✭ 161 (+187.5%)
Mutual labels:  toolbar
Tool Bar
Package providing customisable toolbar for Atom
Stars: ✭ 159 (+183.93%)
Mutual labels:  toolbar
FormToolbar
Simple, movable and powerful toolbar for UITextField and UITextView.
Stars: ✭ 85 (+51.79%)
Mutual labels:  toolbar
NotchToolkit
Use the iPhone X notch in creative ways 👩‍🎨👨‍🎨.
Stars: ✭ 55 (-1.79%)
Mutual labels:  toolbar
qt-quick-responsive-helper
A simple toolbar for QtQuick based applications, to let developers test different resolutions and dpi settings easily. It was made to be integrated with minimal effort (only one QML file), and to be configurable for your specific usage.
Stars: ✭ 26 (-53.57%)
Mutual labels:  toolbar
CustomToolbar
A mockup of the custom toolbar from Social Steps app on Google Play.
Stars: ✭ 28 (-50%)
Mutual labels:  toolbar

Toolbar Elevation on Pre-lollipop Devices.

As we know Lollipop devices gives us a nice shadow by default, but pre Lollipop doesn’t.
Now so to overcome this problem and apply Elevation/Shadow on Pre-lollipop devices.

1. Firstly, we will create a drawable to imitate elevation/shadow

Create a new XML file dropshadow.xml in directory res/drawable

    <?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="#44000000"
            android:angle="90"/>
    </shape>

2. We will add the shadow drawable below toolbar

    <LinearLayout 
        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="wrap_content"
        android:orientation="vertical">

    <android.support.v7.widget.Toolbar
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary" />

    <View
        android:layout_width="match_parent"
        android:layout_height="4dp"
        android:background="@drawable/dropshadow" />

    </LinearLayout>

You also can create a another Toolbar in a separate XML file and call it in xml via the <include/> tag.

Ex. <include layout="@layout/toolbar_shadow" />

Result

Screenshot with shadow

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].