Search in sources :

Example 11 with Snackbar

use of android.support.design.widget.Snackbar in project android by owncloud.

the class FileActivity method showSnackMessage.

/**
     * Show a temporary message in a Snackbar bound to the content view
     *
     * @param message       Message to show.
     */
public void showSnackMessage(String message) {
    Snackbar snackbar = Snackbar.make(findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);
    snackbar.show();
}
Also used : Snackbar(android.support.design.widget.Snackbar)

Example 12 with Snackbar

use of android.support.design.widget.Snackbar in project android-advancedrecyclerview by h6ah4i.

the class SwipeableWithButtonExampleActivity method onItemButtonClicked.

/**
     * This method will be called when a "button placed under the swipeable view" is clicked
     *
     * @param position The position of the item within data set
     */
public void onItemButtonClicked(int position) {
    String text = getString(R.string.snack_bar_text_button_clicked, position);
    Snackbar snackbar = Snackbar.make(findViewById(R.id.container), text, Snackbar.LENGTH_SHORT);
    snackbar.show();
}
Also used : Snackbar(android.support.design.widget.Snackbar)

Example 13 with Snackbar

use of android.support.design.widget.Snackbar in project android-advancedrecyclerview by h6ah4i.

the class SwipeOnLongPressExampleActivity method onItemRemoved.

/**
     * This method will be called when a list item is removed
     *
     * @param position The position of the item within data set
     */
public void onItemRemoved(int position) {
    Snackbar snackbar = Snackbar.make(findViewById(R.id.container), R.string.snack_bar_text_item_removed, Snackbar.LENGTH_LONG);
    snackbar.setAction(R.string.snack_bar_action_undo, new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            onItemUndoActionClicked();
        }
    });
    snackbar.setActionTextColor(ContextCompat.getColor(this, R.color.snackbar_action_color_done));
    snackbar.show();
}
Also used : View(android.view.View) Snackbar(android.support.design.widget.Snackbar)

Example 14 with Snackbar

use of android.support.design.widget.Snackbar in project android-advancedrecyclerview by h6ah4i.

the class ExpandableDraggableSwipeableExampleActivity method onGroupItemRemoved.

/**
     * This method will be called when a group item is removed
     *
     * @param groupPosition The position of the group item within data set
     */
public void onGroupItemRemoved(int groupPosition) {
    Snackbar snackbar = Snackbar.make(findViewById(R.id.container), R.string.snack_bar_text_group_item_removed, Snackbar.LENGTH_LONG);
    snackbar.setAction(R.string.snack_bar_action_undo, new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            onItemUndoActionClicked();
        }
    });
    snackbar.setActionTextColor(ContextCompat.getColor(this, R.color.snackbar_action_color_done));
    snackbar.show();
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) Snackbar(android.support.design.widget.Snackbar)

Example 15 with Snackbar

use of android.support.design.widget.Snackbar in project android-advancedrecyclerview by h6ah4i.

the class DraggableSwipeableExampleActivity method onItemRemoved.

/**
     * This method will be called when a list item is removed
     *
     * @param position The position of the item within data set
     */
public void onItemRemoved(int position) {
    Snackbar snackbar = Snackbar.make(findViewById(R.id.container), R.string.snack_bar_text_item_removed, Snackbar.LENGTH_LONG);
    snackbar.setAction(R.string.snack_bar_action_undo, new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            onItemUndoActionClicked();
        }
    });
    snackbar.setActionTextColor(ContextCompat.getColor(this, R.color.snackbar_action_color_done));
    snackbar.show();
}
Also used : View(android.view.View) Snackbar(android.support.design.widget.Snackbar)

Aggregations

Snackbar (android.support.design.widget.Snackbar)94 View (android.view.View)50 TextView (android.widget.TextView)23 RecyclerView (android.support.v7.widget.RecyclerView)14 Intent (android.content.Intent)13 BaseTransientBottomBar (android.support.design.widget.BaseTransientBottomBar)9 ListView (android.widget.ListView)8 DialogInterface (android.content.DialogInterface)7 ImageView (android.widget.ImageView)7 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)5 ItemTouchHelper (android.support.v7.widget.helper.ItemTouchHelper)5 ViewGroup (android.view.ViewGroup)5 AdapterView (android.widget.AdapterView)5 LinearLayout (android.widget.LinearLayout)5 File (java.io.File)5 ArrayList (java.util.ArrayList)5 Bitmap (android.graphics.Bitmap)4 Nullable (android.support.annotation.Nullable)4 LayoutInflater (android.view.LayoutInflater)4 RemindyDAO (ve.com.abicelis.remindy.database.RemindyDAO)4