Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Stavor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orekit
Stavor
Commits
65c7fb29
Commit
65c7fb29
authored
10 years ago
by
Xavier Gibert
Browse files
Options
Downloads
Patches
Plain Diff
welcome dialog beauty
parent
82abffac
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
res/layout/mission.xml
+1
-1
1 addition, 1 deletion
res/layout/mission.xml
res/layout/mission_list_item.xml
+1
-1
1 addition, 1 deletion
res/layout/mission_list_item.xml
src/cs/si/stavor/dialogs/WelcomeDialogFragment.java
+20
-1
20 additions, 1 deletion
src/cs/si/stavor/dialogs/WelcomeDialogFragment.java
with
22 additions
and
3 deletions
res/layout/mission.xml
+
1
−
1
View file @
65c7fb29
...
...
@@ -68,7 +68,7 @@
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/textView
3
"
android:id=
"@+id/textView
DialogPath
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
...
...
This diff is collapsed.
Click to expand it.
res/layout/mission_list_item.xml
+
1
−
1
View file @
65c7fb29
...
...
@@ -32,7 +32,7 @@
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/textView
3
"
android:id=
"@+id/textView
DialogPath
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingRight=
"5dp"
...
...
This diff is collapsed.
Click to expand it.
src/cs/si/stavor/dialogs/WelcomeDialogFragment.java
+
20
−
1
View file @
65c7fb29
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment