Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalkhan1690 committed Jun 10, 2015
2 parents eebdce0 + d1f3864 commit 0334018
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/main/java/com/hisham/design/CoordinatorLayoutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
CoordinatorLayout and floating action buttons
A great example of this is when you add a FloatingActionButton as a child of your CoordinatorLayout and then pass that CoordinatorLayout to your Snackbar.make() call - instead of the snackbar displaying over the floating action button, the FloatingActionButton takes advantage of additional callbacks provided by CoordinatorLayout to automatically move upward as the snackbar animates in and returns to its lastPosition when the snackbar animates out on Android 3.0 and higher devices - no extra code required.
SnackBar
* <pre class="prettyprint">
* Snackbar.make(coordinatorLayout, "You removed : " + lastItem, Snackbar.LENGTH_LONG)
* .setAction("Undo", new View.OnClickListener() {
*
* public void onClick(View v) {
* list.add(lastPosition, lastItem);
* adapter.notifyDataSetChanged();
* }
* }).show();
* </pre>
*/
public class CoordinatorLayoutActivity extends AppCompatActivity {

Expand Down

0 comments on commit 0334018

Please sign in to comment.