use of android.support.v4.app.DialogFragment in project android-advancedrecyclerview by h6ah4i.
the class ExpandableDraggableSwipeableExampleActivity method onChildItemPinned.
/**
* This method will be called when a child item is pinned
*
* @param groupPosition The group position of the child item within data set
* @param childPosition The position of the child item within the group
*/
public void onChildItemPinned(int groupPosition, int childPosition) {
final DialogFragment dialog = ExpandableItemPinnedMessageDialogFragment.newInstance(groupPosition, childPosition);
getSupportFragmentManager().beginTransaction().add(dialog, FRAGMENT_TAG_ITEM_PINNED_DIALOG).commit();
}
use of android.support.v4.app.DialogFragment in project android-advancedrecyclerview by h6ah4i.
the class ExpandableDraggableSwipeableExampleActivity method onGroupItemPinned.
/**
* This method will be called when a group item is pinned
*
* @param groupPosition The position of the group item within data set
*/
public void onGroupItemPinned(int groupPosition) {
final DialogFragment dialog = ExpandableItemPinnedMessageDialogFragment.newInstance(groupPosition, RecyclerView.NO_POSITION);
getSupportFragmentManager().beginTransaction().add(dialog, FRAGMENT_TAG_ITEM_PINNED_DIALOG).commit();
}
use of android.support.v4.app.DialogFragment in project android-advancedrecyclerview by h6ah4i.
the class VerticalSwipeableExampleActivity method onItemPinned.
/**
* This method will be called when a list item is pinned
*
* @param position The position of the item within data set
*/
public void onItemPinned(int position) {
final DialogFragment dialog = ItemPinnedMessageDialogFragment.newInstance(position);
getSupportFragmentManager().beginTransaction().add(dialog, FRAGMENT_TAG_ITEM_PINNED_DIALOG).commit();
}
use of android.support.v4.app.DialogFragment in project barcodescanner by dm77.
the class FullScannerFragment method onOptionsItemSelected.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle presses on the action bar items
switch(item.getItemId()) {
case R.id.menu_flash:
mFlash = !mFlash;
if (mFlash) {
item.setTitle(R.string.flash_on);
} else {
item.setTitle(R.string.flash_off);
}
mScannerView.setFlash(mFlash);
return true;
case R.id.menu_auto_focus:
mAutoFocus = !mAutoFocus;
if (mAutoFocus) {
item.setTitle(R.string.auto_focus_on);
} else {
item.setTitle(R.string.auto_focus_off);
}
mScannerView.setAutoFocus(mAutoFocus);
return true;
case R.id.menu_formats:
DialogFragment fragment = FormatSelectorDialogFragment.newInstance(this, mSelectedIndices);
fragment.show(getActivity().getSupportFragmentManager(), "format_selector");
return true;
case R.id.menu_camera_selector:
mScannerView.stopCamera();
DialogFragment cFragment = CameraSelectorDialogFragment.newInstance(this, mCameraId);
cFragment.show(getActivity().getSupportFragmentManager(), "camera_selector");
return true;
default:
return super.onOptionsItemSelected(item);
}
}
use of android.support.v4.app.DialogFragment in project barcodescanner by dm77.
the class FullScannerFragment method closeDialog.
public void closeDialog(String dialogName) {
FragmentManager fragmentManager = getActivity().getSupportFragmentManager();
DialogFragment fragment = (DialogFragment) fragmentManager.findFragmentByTag(dialogName);
if (fragment != null) {
fragment.dismiss();
}
}
Aggregations