Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Field Science
Field Day
Commits
1604cab6
Commit
1604cab6
authored
Mar 29, 2021
by
Craig Earley
Browse files
adds alert dialog to Skydio and Parrot buttons
parent
54d86b7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/fieldscience/cs/earlham/edu/fieldday/ParrotFlightActivity.java
View file @
1604cab6
package
fieldscience.cs.earlham.edu.fieldday
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.os.Bundle
;
public
class
ParrotFlightActivity
extends
Activity
{
import
androidx.appcompat.app.AlertDialog
;
import
androidx.appcompat.app.AppCompatActivity
;
public
class
ParrotFlightActivity
extends
AppCompatActivity
{
private
Context
context
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
//setContentView(R.layout.activity_uav);
context
=
this
;
AlertDialog
.
Builder
alert
=
new
AlertDialog
.
Builder
(
ParrotFlightActivity
.
this
)
.
setTitle
(
"UAV Support Coming Soon"
)
.
setMessage
(
"We are developing support for UAV flights in Field Day now. Check back soon!"
)
.
setPositiveButton
(
R
.
string
.
ok
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
}
});
AlertDialog
dialog
=
alert
.
create
();
dialog
.
show
();
}
}
app/src/main/java/fieldscience/cs/earlham/edu/fieldday/SkydioFlightActivity.java
View file @
1604cab6
package
fieldscience.cs.earlham.edu.fieldday
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.os.Bundle
;
public
class
SkydioFlightActivity
extends
Activity
{
import
androidx.appcompat.app.AlertDialog
;
import
androidx.appcompat.app.AppCompatActivity
;
public
class
SkydioFlightActivity
extends
AppCompatActivity
{
private
Context
context
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
//setContentView(R.layout.activity_uav);
context
=
this
;
AlertDialog
.
Builder
alert
=
new
AlertDialog
.
Builder
(
SkydioFlightActivity
.
this
)
.
setTitle
(
"UAV Support Coming Soon"
)
.
setMessage
(
"We are developing support for UAV flights in Field Day now. Check back soon!"
)
.
setPositiveButton
(
R
.
string
.
ok
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
}
});
AlertDialog
dialog
=
alert
.
create
();
dialog
.
show
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment