主题
<style name="quick_option_dialog" parent="@style/Theme.AppCompat.Dialog">
<item name="android:windowBackground">@color/white</item>
</style>
public class CustomDialog extends Dialog {
public CustomDialog(Context context,String path) {
//重写dialog默认的主题
this(context, R.style.quick_option_dialog,path);
}
public CustomDialog(Context context, int themeResId,String path) {
super(context, themeResId);
View convertView = getLayoutInflater().inflate(R.layout.dialog_photo_entry, null);
requestWindowFeature(Window.FEATURE_NO_TITLE);
ImageView img = (ImageView) convertView.findViewById(R.id.large_image);
img.setImageDrawable(stringToDrawable(path));
convertView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
dialog全屏显示图片
最新推荐文章于 2023-08-22 12:56:55 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)