1 package jp.sourceforge.gokigen.memoma.dialogs;
3 import android.app.Activity;
4 import android.app.AlertDialog;
5 import android.app.Dialog;
6 import android.content.Context;
7 import android.view.LayoutInflater;
8 import android.view.View;
9 import android.widget.TextView;
11 import jp.sourceforge.gokigen.memoma.R;
19 public class CreditDialog
21 private Activity context;
27 public CreditDialog(Activity arg)
36 public Dialog getDialog()
38 LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
43 View layout = inflater.inflate(R.layout.creditdialog, null); // ?? http://www.mail-archive.com/android-developers@googlegroups.com/msg162003.html より
44 //View layout = inflater.inflate(R.layout.creditdialog, context.findViewById(R.id.layout_root));
46 TextView text = layout.findViewById(R.id.creditmessage);
47 text.setText(context.getString(R.string.app_credit));
48 // ImageView image = (ImageView) layout.findViewById(R.id.crediticon);
49 // image.setImageResource(R.drawable.icon);
51 AlertDialog.Builder builder = new AlertDialog.Builder(context);
52 builder.setTitle(context.getString(R.string.app_name));
53 builder.setIcon(R.drawable.icon);
54 builder.setView(layout);
55 builder.setCancelable(true);
56 return (builder.create());