diff --git a/samples/SupportDesignDemos/AndroidManifest.xml b/samples/SupportDesignDemos/AndroidManifest.xml
index a92f28188..f998dccc3 100644
--- a/samples/SupportDesignDemos/AndroidManifest.xml
+++ b/samples/SupportDesignDemos/AndroidManifest.xml
@@ -54,5 +54,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/SupportDesignDemos/res/layout/design_snackbar.xml b/samples/SupportDesignDemos/res/layout/design_snackbar.xml
new file mode 100644
index 000000000..ea5508a03
--- /dev/null
+++ b/samples/SupportDesignDemos/res/layout/design_snackbar.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/SupportDesignDemos/res/layout/design_snackbar_with_fab.xml b/samples/SupportDesignDemos/res/layout/design_snackbar_with_fab.xml
new file mode 100644
index 000000000..e3bcd7cde
--- /dev/null
+++ b/samples/SupportDesignDemos/res/layout/design_snackbar_with_fab.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/SupportDesignDemos/res/layout/design_text_input.xml b/samples/SupportDesignDemos/res/layout/design_text_input.xml
new file mode 100644
index 000000000..4561df125
--- /dev/null
+++ b/samples/SupportDesignDemos/res/layout/design_text_input.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/SupportDesignDemos/res/values/strings.xml b/samples/SupportDesignDemos/res/values/strings.xml
index 4b503c2c0..7bcfb814e 100644
--- a/samples/SupportDesignDemos/res/values/strings.xml
+++ b/samples/SupportDesignDemos/res/values/strings.xml
@@ -19,6 +19,8 @@
Floating Action Button/BasicTabLayout/Usage
+ Text Input
+
Normal sizeMini size
@@ -30,4 +32,17 @@
Add tabRemove tab
+ Username
+ Email address
+ Show error
+ Clear error
+
+ Snackbar/Usage
+ Snackbar/Coordinated with FAB
+ Snackbar (short message)
+ Snackbar (long message)
+ Show (short message + action)
+ Show (long message + action)
+ Show (long message + long action)
+
diff --git a/samples/SupportDesignDemos/src/com/example/android/support/design/widget/SnackbarUsage.java b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/SnackbarUsage.java
new file mode 100644
index 000000000..c2ff6c9dd
--- /dev/null
+++ b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/SnackbarUsage.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.support.design.widget;
+
+import com.example.android.support.design.R;
+
+import android.os.Bundle;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Toast;
+
+/**
+ * This demonstrates idiomatic usage of the Floating Action Button
+ */
+public class SnackbarUsage extends AppCompatActivity {
+
+ private ViewGroup mContentView;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(getLayoutId());
+
+ mContentView = (ViewGroup) findViewById(R.id.content_view);
+ }
+
+ protected int getLayoutId() {
+ return R.layout.design_snackbar;
+ }
+
+ public void showShort(View view) {
+ Snackbar.make(mContentView, "Short snackbar message", Snackbar.LENGTH_SHORT).show();
+ }
+
+ public void showAction(View view) {
+ Snackbar.make(mContentView, "Short snackbar message", Snackbar.LENGTH_SHORT)
+ .setAction("Action", new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Toast.makeText(SnackbarUsage.this, "Snackbar Action pressed",
+ Toast.LENGTH_SHORT).show();
+ }
+ }).show();
+ }
+
+ public void showLong(View view) {
+ Snackbar.make(mContentView, "Long snackbar message which wraps onto another line and"
+ + "makes the Snackbar taller", Snackbar.LENGTH_SHORT).show();
+ }
+
+ public void showLongAction(View view) {
+ Snackbar.make(mContentView, "Long snackbar message which wraps onto another line and"
+ + "makes the Snackbar taller", Snackbar.LENGTH_SHORT)
+ .setAction("Action", new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Toast.makeText(SnackbarUsage.this, "Snackbar Action pressed",
+ Toast.LENGTH_SHORT).show();
+ }
+ }).show();
+ }
+
+ public void showLongLongAction(View view) {
+ Snackbar.make(mContentView, "Long snackbar message which wraps onto another line and"
+ + "makes the Snackbar taller", Snackbar.LENGTH_SHORT)
+ .setAction("Action which wraps", new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Toast.makeText(SnackbarUsage.this, "Snackbar Action pressed",
+ Toast.LENGTH_SHORT).show();
+ }
+ }).show();
+ }
+
+}
\ No newline at end of file
diff --git a/samples/SupportDesignDemos/src/com/example/android/support/design/widget/SnackbarWithFloatingActionButton.java b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/SnackbarWithFloatingActionButton.java
new file mode 100644
index 000000000..cf8ec8a3f
--- /dev/null
+++ b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/SnackbarWithFloatingActionButton.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.support.design.widget;
+
+import com.example.android.support.design.R;
+
+import android.os.Bundle;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * This demonstrates idiomatic usage of the Floating Action Button
+ */
+public class SnackbarWithFloatingActionButton extends SnackbarUsage {
+
+ @Override
+ protected int getLayoutId() {
+ return R.layout.design_snackbar_with_fab;
+ }
+
+}
\ No newline at end of file
diff --git a/samples/SupportDesignDemos/src/com/example/android/support/design/widget/TextInputLayoutUsage.java b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/TextInputLayoutUsage.java
new file mode 100644
index 000000000..63ac03112
--- /dev/null
+++ b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/TextInputLayoutUsage.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.support.design.widget;
+
+import com.example.android.support.design.R;
+
+import android.os.Bundle;
+import android.support.design.widget.TextInputLayout;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+
+/**
+ * This demonstrates idiomatic usage of {@code TextInputLayout}
+ */
+public class TextInputLayoutUsage extends AppCompatActivity {
+
+ private TextInputLayout mUsernameInputLayout;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.design_text_input);
+
+ mUsernameInputLayout = (TextInputLayout) findViewById(R.id.input_username);
+ }
+
+ public void showError(View view) {
+ mUsernameInputLayout.setError("Some unknown error has occurred");
+ }
+
+ public void clearError(View view) {
+ mUsernameInputLayout.setError(null);
+ }
+
+}