you need to include dependencies
for the design, which will be such that it will be added to the dependencies
block of the app
build.gradle
module
compile 'com.android.support:design:23.1.1'
it should be something like this.
you need this support library like CoordinatorLayout
, AppBarLayout
and FloatingActionButton
its part
create style in style file
<style name="AppTheme" parent="Base.Theme.AppCompat.Light"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style>
and indicate that in your AndroidManifest file
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:largeHeap="true" android:supportsRtl="true" android:theme="@style/AppTheme">// like this
source share