AboutDialog の追加
public class AboutDialog extends AlertDialog {
private Context context;
public AboutDialog(Context context) {
super(context);
this.context = context;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout li = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.about_layout, null);
TextView textView = li.findViewById(R.id.textView3);
textView.setText(Html.fromHtml("<u>" + getString(R.string.GooglePlayStore) + "<u>"));
Pattern pattern = Pattern.compile("");
String url = getString(R.string.PlayURL);
Linkify.addLinks(textView, pattern, url, null, null);
setContentView(li);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingTop="10dp"
android:paddingRight="20dp"
android:paddingBottom="30dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
app:srcCompat="@mipmap/ic_launcher_foreground" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:text="@string/app_name"
android:textSize="30dp" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:text="@string/kankanla"
android:textSize="20dp" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:text="@string/GooglePlayStore"
android:textSize="20dp" />
</LinearLayout>
public class AboutDialog extends AlertDialog {
private Context context;
public AboutDialog(Context context) {
super(context);
this.context = context;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout li = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.about_layout, null);
TextView textView = li.findViewById(R.id.textView3);
textView.setText(Html.fromHtml("<u>" + getString(R.string.GooglePlayStore) + "<u>"));
Pattern pattern = Pattern.compile("");
String url = getString(R.string.PlayURL);
Linkify.addLinks(textView, pattern, url, null, null);
setContentView(li);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingTop="10dp"
android:paddingRight="20dp"
android:paddingBottom="30dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
app:srcCompat="@mipmap/ic_launcher_foreground" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:text="@string/app_name"
android:textSize="30dp" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:text="@string/kankanla"
android:textSize="20dp" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:text="@string/GooglePlayStore"
android:textSize="20dp" />
</LinearLayout>
0 件のコメント:
コメントを投稿