Android Developerのドキュメントリンクを使用してカスタムダイアログボックスを作成しています。このために、レイアウトファイルを作成しました。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rotatelayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#80000000"
>
<ImageView
android:id="@+id/dialogimage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
そして私はこのダイアログを膨らませています、
AlertDialog dialog;
AlertDialog.Builder builder;
builder = new AlertDialog.Builder(TabsActivity.this);
LayoutInflater inflator = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflator.inflate(R.layout.rotate_dialog_layout, (ViewGroup) findViewById(R.id.rotatelayout));
ImageView image = (ImageView) view.findViewById(R.id.dialogimage);
image.setOnClickListener(new RotateLockListener());
image.setBackgroundColor(Color.parseColor("#80000000"));
if(locked)
{
image.setImageResource(R.drawable.lock_icon);
}
else
{
image.setImageResource(R.drawable.unlock_icon);
}
builder.setView(view).setCancelable(true);
dialog = builder.create();
dialog.setView(view, 0, 0, 0, 0);
timerDelayRemoveDialog(time, dialog);
dialog.show();
しかし、それでもそれはとして表示されます
StackOverFlowで提供されているすべてのヘルプを試しました
ImageViewの背景を透明に設定します。
しかし、それらのどれも機能しませんでした、それはまだ現れています。