Skip to content
Snippets Groups Projects
Commit 65c7fb29 authored by Xavier Gibert's avatar Xavier Gibert
Browse files

welcome dialog beauty

parent 82abffac
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView3"
android:id="@+id/textViewDialogPath"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
......
......@@ -32,7 +32,7 @@
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView3"
android:id="@+id/textViewDialogPath"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
......
......@@ -6,7 +6,10 @@ import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.TextView;
/**
* Welcome dialog to inform of the installation paths
......@@ -19,8 +22,24 @@ public class WelcomeDialogFragment extends DialogFragment {
// Use the Builder class for convenient dialog construction
String data_path = Installer.getOrekitDataRoot(this.getActivity()).getPath();
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
// Get the layout inflater
//LayoutInflater inflater = getActivity().getLayoutInflater();
// Inflate and set the layout for the dialog
// Pass null as the parent view because its going in the dialog layout
//builder.setView(inflater.inflate(R.layout.welcome, null));
builder.setIcon(R.drawable.ic_launcher);
TextView tx_path = new TextView(getActivity());
tx_path.setText(data_path);
tx_path.setTypeface(null,Typeface.ITALIC);
int padding_in_dp = 20; // 6 dps
final float scale = getResources().getDisplayMetrics().density;
int padding_in_px = (int) (padding_in_dp * scale + 0.5f);
tx_path.setPadding(padding_in_px, 0, padding_in_px, 0);
builder.setView(tx_path);
builder.setTitle(getString(R.string.dialog_welcome))
.setMessage(getString(R.string.dialog_install_message)+" "+data_path)
.setMessage(getString(R.string.dialog_install_message))
.setPositiveButton(getString(R.string.dialog_continue), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// Dummy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment