use of net.iGap.R.string.array_Delete_photo in project iGap-Android by KianIranian-STDG.
the class FragmentShowAvatars method initComponent.
private void initComponent(View view) {
// ViewGroup rooShowImage = (ViewGroup) view.findViewById(R.id.rooShowImage);
// rooShowImage.setBackgroundColor(G.fragmentActivity.getResources().getColor(R.color.black));
RippleView rippleBack = view.findViewById(R.id.asi_ripple_back);
rippleBack.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
@Override
public void onComplete(RippleView rippleView) {
G.fragmentActivity.onBackPressed();
}
});
RippleView rippleMenu = view.findViewById(R.id.asi_ripple_menu);
rippleMenu.setOnRippleCompleteListener(rippleView -> {
if (getContext() == null)
return;
List<Integer> items = new ArrayList<>();
items.add(R.string.save_to_gallery);
switch(from) {
case setting:
items.add(R.string.array_Delete_photo);
break;
case group:
if (roleGroup == GroupChatRole.OWNER || roleGroup == GroupChatRole.ADMIN) {
items.add(R.string.array_Delete_photo);
}
break;
case channel:
if (roleChannel == ChannelChatRole.OWNER || roleChannel == ChannelChatRole.ADMIN) {
items.add(R.string.array_Delete_photo);
}
break;
}
new TopSheetDialog(getContext()).setListDataWithResourceId(items, -1, position -> {
if (items.get(position) == R.string.save_to_gallery) {
saveToGallery();
} else if (items.get(position) == array_Delete_photo) {
switch(from) {
case setting:
deletePhotoSetting();
break;
case group:
deletePhotoGroup();
break;
case channel:
deletePhotoChannel();
break;
case chat:
deletePhotoChat();
break;
}
}
}).show();
});
viewPager = view.findViewById(R.id.asi_view_pager);
txtImageNumber = view.findViewById(R.id.asi_txt_image_number);
toolbarShowImage = view.findViewById(R.id.showAvatarToolbar);
initViewPager();
}
Aggregations