点击图片后,图片应在android中以全屏模式打开。 我正在使用GitHub的翻转视图寻呼机。我得到了与GitHub链接相同的所有布局和功能。但我想在同一个屏幕上添加更多功能,以全屏方式打开图像。
final ListView friends = (ListView) inflater.inflate(R.layout.activity_friends,container,false);
FlipSettings settings=new FlipSettings.Builder().defaultPage(1).build();
friends.setAdapter(new FriendsAdapter(getActivity(), Utils.friends,settings));
friends.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Friend friend = (Friend) friends.getAdapter().getItem(position);
final Dialog nagDialog = new Dialog(getActivity(),android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
nagDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
nagDialog.setCancelable(false);
nagDialog.setContentView(R.layout.preview_image);
Button btnClose = (Button)nagDialog.findViewById(R.id.btnIvClose);
//ImageView ivPreview = (ImageView)nagDialog.findViewById(R.id.first);
//ivPreview.setBackground(dd);
btnClose.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
nagDialog.dismiss();
}
});
nagDialog.show();
Toast.makeText(getContext(), friend.getNickname(), Toast.LENGTH_SHORT).show();
}
});
return friends;
https://github.com/Yalantis/FlipViewPager.Draco
请找到整个代码的上述链接。