diff --git a/MaterialSample/app/app.iml b/MaterialSample/app/app.iml
index 47b53b9..ba34eef 100644
--- a/MaterialSample/app/app.iml
+++ b/MaterialSample/app/app.iml
@@ -77,6 +77,7 @@
+
@@ -96,6 +97,7 @@
+
diff --git a/MaterialSample/app/build.gradle b/MaterialSample/app/build.gradle
index 1bdee11..abdbc47 100644
--- a/MaterialSample/app/build.gradle
+++ b/MaterialSample/app/build.gradle
@@ -26,4 +26,5 @@ dependencies {
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.android.support:palette-v7:22.2.0'
+ compile 'it.sephiroth.android.library.viewrevealanimator:view-reveal-animator:+'
}
diff --git a/MaterialSample/app/src/main/AndroidManifest.xml b/MaterialSample/app/src/main/AndroidManifest.xml
index 755b9a9..e58c4f5 100644
--- a/MaterialSample/app/src/main/AndroidManifest.xml
+++ b/MaterialSample/app/src/main/AndroidManifest.xml
@@ -1,16 +1,16 @@
+ package="com.suleiman.material">
+ android:theme="@style/MyTheme">
+ android:label="@string/app_name">
@@ -38,8 +38,17 @@
android:label="@string/title_activity_tab_animation" />
+ android:label="@string/title_activity_nested_toolbar" />
+
+
+
diff --git a/MaterialSample/app/src/main/java/com/suleiman/material/activities/FabHideActivity.java b/MaterialSample/app/src/main/java/com/suleiman/material/activities/FabHideActivity.java
index ce19e32..5596f13 100644
--- a/MaterialSample/app/src/main/java/com/suleiman/material/activities/FabHideActivity.java
+++ b/MaterialSample/app/src/main/java/com/suleiman/material/activities/FabHideActivity.java
@@ -127,11 +127,8 @@ public void onNothingSelected(AdapterView> parent) {
if (simpleRecyclerAdapter == null) {
simpleRecyclerAdapter = new SimpleRecyclerAdapter(listData);
recyclerView.setAdapter(simpleRecyclerAdapter);
- } else {
- simpleRecyclerAdapter.notifyDataSetChanged();
}
-
recyclerView.addOnScrollListener(new MyRecyclerScroll() {
@Override
public void show() {
diff --git a/MaterialSample/app/src/main/java/com/suleiman/material/activities/MainActivity.java b/MaterialSample/app/src/main/java/com/suleiman/material/activities/MainActivity.java
index c2f8436..70a7e41 100644
--- a/MaterialSample/app/src/main/java/com/suleiman/material/activities/MainActivity.java
+++ b/MaterialSample/app/src/main/java/com/suleiman/material/activities/MainActivity.java
@@ -78,6 +78,11 @@ public void onItemClick(View view, int position) {
intent = new Intent(MainActivity.this, NestedToolbarActivity.class);
startActivity(intent);
break;
+ case 6:
+ intent = new Intent(MainActivity.this, QuickReturnActivity.class);
+ startActivity(intent);
+ break;
+
default:
Toast.makeText(getBaseContext(), "Undefined Click!", Toast.LENGTH_SHORT).show();
}
diff --git a/MaterialSample/app/src/main/java/com/suleiman/material/activities/NavDrawerActivity.java b/MaterialSample/app/src/main/java/com/suleiman/material/activities/NavDrawerActivity.java
index 2f64efe..d81e38c 100644
--- a/MaterialSample/app/src/main/java/com/suleiman/material/activities/NavDrawerActivity.java
+++ b/MaterialSample/app/src/main/java/com/suleiman/material/activities/NavDrawerActivity.java
@@ -91,7 +91,7 @@ protected void onRestoreInstanceState(Bundle savedInstanceState) {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
- getMenuInflater().inflate(R.menu.menu_nav_drawer, menu);
+ getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
diff --git a/MaterialSample/app/src/main/java/com/suleiman/material/activities/QuickReturnActivity.java b/MaterialSample/app/src/main/java/com/suleiman/material/activities/QuickReturnActivity.java
new file mode 100644
index 0000000..e4583f8
--- /dev/null
+++ b/MaterialSample/app/src/main/java/com/suleiman/material/activities/QuickReturnActivity.java
@@ -0,0 +1,82 @@
+package com.suleiman.material.activities;
+
+import android.os.Bundle;
+import android.support.design.widget.CoordinatorLayout;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.support.v7.widget.Toolbar;
+import android.view.Menu;
+import android.view.MenuItem;
+
+import com.suleiman.material.R;
+import com.suleiman.material.adapter.SimpleRecyclerAdapter;
+import com.suleiman.material.model.VersionModel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Suleiman on 15-06-2015.
+ */
+public class QuickReturnActivity extends AppCompatActivity {
+ RecyclerView recyclerView;
+ SimpleRecyclerAdapter adapter;
+ CoordinatorLayout mCoordinatorLayout;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.activity_quick_return);
+
+ final Toolbar toolbar = (Toolbar) findViewById(R.id.quickreturn_toolbar);
+ setSupportActionBar(toolbar);
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+
+ mCoordinatorLayout = (CoordinatorLayout) findViewById(R.id.quickreturn_coordinator);
+ recyclerView = (RecyclerView) findViewById(R.id.quickreturn_list);
+
+ recyclerView.setHasFixedSize(true);
+ recyclerView.setLayoutManager(new LinearLayoutManager(this));
+
+ List listData = new ArrayList();
+ int ct = 0;
+ for (int i = 0; i < VersionModel.data.length * 3; i++) {
+ listData.add(VersionModel.data[ct]);
+ ct++;
+ if (ct == VersionModel.data.length) {
+ ct = 0;
+ }
+ }
+
+ if (adapter == null) {
+ adapter = new SimpleRecyclerAdapter(listData);
+ recyclerView.setAdapter(adapter);
+ }
+
+
+ }
+
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ getMenuInflater().inflate(R.menu.menu_main, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+
+ switch (item.getItemId()) {
+ case R.id.action_settings:
+ return true;
+ case android.R.id.home:
+ supportFinishAfterTransition();
+ return true;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+}
diff --git a/MaterialSample/app/src/main/java/com/suleiman/material/activities/TabAnimationActivity.java b/MaterialSample/app/src/main/java/com/suleiman/material/activities/TabAnimationActivity.java
index 610dbd4..40e2c09 100644
--- a/MaterialSample/app/src/main/java/com/suleiman/material/activities/TabAnimationActivity.java
+++ b/MaterialSample/app/src/main/java/com/suleiman/material/activities/TabAnimationActivity.java
@@ -91,7 +91,7 @@ private void setupViewPager(ViewPager viewPager) {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
- getMenuInflater().inflate(R.menu.menu_tab_animation, menu);
+ getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
diff --git a/MaterialSample/app/src/main/res/layout/activity_quick_return.xml b/MaterialSample/app/src/main/res/layout/activity_quick_return.xml
new file mode 100644
index 0000000..f3b116e
--- /dev/null
+++ b/MaterialSample/app/src/main/res/layout/activity_quick_return.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MaterialSample/app/src/main/res/menu/menu_home_navigator.xml b/MaterialSample/app/src/main/res/menu/menu_home_navigator.xml
index 6e99242..7fed968 100644
--- a/MaterialSample/app/src/main/res/menu/menu_home_navigator.xml
+++ b/MaterialSample/app/src/main/res/menu/menu_home_navigator.xml
@@ -2,6 +2,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.suleiman.material.activities.MainActivity">
-
+
diff --git a/MaterialSample/app/src/main/res/menu/menu_nav_drawer.xml b/MaterialSample/app/src/main/res/menu/menu_nav_drawer.xml
deleted file mode 100644
index 938d431..0000000
--- a/MaterialSample/app/src/main/res/menu/menu_nav_drawer.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/MaterialSample/app/src/main/res/menu/menu_tab_animation.xml b/MaterialSample/app/src/main/res/menu/menu_tab_animation.xml
deleted file mode 100644
index baab6f0..0000000
--- a/MaterialSample/app/src/main/res/menu/menu_tab_animation.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/MaterialSample/app/src/main/res/values/arrays.xml b/MaterialSample/app/src/main/res/values/arrays.xml
index f568618..3a21cb6 100644
--- a/MaterialSample/app/src/main/res/values/arrays.xml
+++ b/MaterialSample/app/src/main/res/values/arrays.xml
@@ -8,6 +8,7 @@
- Toolbar Animation with Image
- Material Style Tabs
- Card View Toolbar
+ - Quick Return Pattern
@@ -15,9 +16,10 @@
- G+ like on scroll hide animation
- Overlaid transparent Toolbar
- Material Design drawer with scrim
- - Using the new Support Design library
- - Tab strip with Design support lib
+ - Using the new Support Design Library
+ - Tab strip with Design Support Lib
- Nested Toolbar in card
+ - UI Pattern using Design Support Lib
diff --git a/MaterialSample/app/src/main/res/values/strings.xml b/MaterialSample/app/src/main/res/values/strings.xml
index 05845ff..7b2a963 100644
--- a/MaterialSample/app/src/main/res/values/strings.xml
+++ b/MaterialSample/app/src/main/res/values/strings.xml
@@ -17,4 +17,6 @@
Nested Toolbar
Search
View
+ Quick Return
+ Reveal Animation
diff --git a/MaterialSample/app/src/main/res/values/styles.xml b/MaterialSample/app/src/main/res/values/styles.xml
index d62eba1..b8fde89 100644
--- a/MaterialSample/app/src/main/res/values/styles.xml
+++ b/MaterialSample/app/src/main/res/values/styles.xml
@@ -7,6 +7,7 @@
- @color/primary_700
- @color/accent_500
- false
+ - true
- true
- @color/background_material_light