Screen Shot:
This is Android Studio Project:
Include following dependency in your build.gradle file
build.gradle:
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.ramsandroid.snackbarexample" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.0.1' }
activity_main.java:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.ramsandroid.snackbarexample.MainActivity"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Snack Bar" android:id="@+id/button_snackbar" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="63dp" /> </RelativeLayout>
MainActivity.java:
package com.ramsandroid.snackbarexample; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button snackBarButton = (Button) findViewById(R.id.button_snackbar); snackBarButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Snackbar snackbar = Snackbar.make(v, "Snackbar working", Snackbar.LENGTH_LONG); snackbar.show(); } }); } }
Thank you for giving the information and it is use full for me. training with placement company in Hyderabad
ReplyDelete9Apps Apk
ReplyDelete360 Root Apk
GBWhatsApp Apk
GetApk Market Apk
Lulubox Apk
ReplyDeleteI always enjoy reading quality articles by an individual who is obviously knowledgeable on their chosen subject. Ill be watching this post with much interest. Keep up the great work, I will be back
Android Training Institute in Noida
Python Training Classes in Noida
Very nice post now you can use VipFB to increase fb likes
ReplyDeleteExcellent! post thanks for best posting, The information was very helpful.Thank for sharing this informative post.
ReplyDeleteThe informatation you provided that is very effected and helpful inforamtion here is below links
app web development tutorial
app python programming language course
app asp.net training course
app app development training
app unity android game development course
app unity android game development app
app wordpress course online
app wordpress course tutorial
app sql database tutorial
app sql database tutorial app
app machine learning course
app machine learning course app
app mean stack web developer course
app mean stack web developer
app android developer with kotlin
app java programming course app
app java programming online course
app python programming with Django training
app python programming Django training
app seo training course
app search engine optimization tutorial
app Search engine marketing course
app Google adwords ads
app Google adwords ads tutorial
app Google adwords ads course
app Social media marketing courses
app Social media marketing tutorial
app facebook marketing tutorial
app facebook marketing course
app instagram marketing course
Make sure your website doesn't contain 404 error pages. Every blogger wants to display his/her page on the first page of the google. In this process i've followed forums, pdf submissions, directory submissions and many more. You also try it out and reach your blog to the abounding online communities and eventually get the fruitful results.
ReplyDeleteWatch your favorite TV Shows and movies exclusively on Morpheus TV
Morpheus TV Apk Highlights
Morpheus TV Intriguing Features
Download Morpheus TV
Tq for sharing valuable information with us about study bible
ReplyDeleteTo recover lost files click on: android data recovery
android data recovery apk without root
android data recovery software
android data recovery app
android data recovery free
android recovery
diskdigger for android
Today Telugu news updates provide us the information of breaking news and live updates. we get live news, political, education, technology, etc. Today Telugu news gives the best news updates. It also keeps its readers informed about the latest happenings in the world with instant updates.
ReplyDeleteReally an awesome blog for the freshers. Thanks for posting the information.
ReplyDeleteAndroid Training in Delhi
Android Course in Delhi
very informative blog and useful article thank you for sharing with us , keep posting learn more Technology
ReplyDeleteAndroid Training
Android App development Course
Android Online Training
Your content is very nice. Check out our blog on Android Course
ReplyDeleteYou are doing a fantastic job and sharing your knowledge to others! it was one of the very good post to read and useful to improve the knowledge as updated one, keep doing the nice work. Android Training in Electronic City
ReplyDeleteNice information on android
ReplyDeleteYou are making an incredible showing and imparting your insight to other people! Cooking Madness
ReplyDeleteWaoo This is the best ever example i liked it for more Click here to download
ReplyDeleteyou can also download Antena View Apk Free Download
free android app download.The best apps download games ,file manager , youtube video downloader . Android blue
ReplyDeleteDownload the Home School App which is one of the best Online Teaching App on Google Playstore. Teach students in a interactive way by recording educational videos and by sharing it with them on the Home School App. You can also save educational videos on the app for best offline learning.
ReplyDeleteThank you for discussing this very useful article. I heard something new from you. Keep blogging. android training in jalandhar
ReplyDeleteAndroid Training in Noida
ReplyDeleteAndroid Training Institute in Noida
Thankyou for sharing such a great information about Web and mobile app development
ReplyDelete