How to minimize a Activity

Put your problem here if it does not fit any of the other categories.

How to minimize a Activity

Postby cassianotartari » Mon Sep 29, 2008 9:46 pm

Hi,

I will try to explain my doubt. I have a form to add points to a map and when I click the button "Add Point" in the menu of my map, start a activity with a form, this form have a button "Choose the point" to choose a point of the map. My idea is to when a user click in this button, hide/minimize the activity(form) and after the user click in a point on the map show/maximize again the form.

Android version: m5-r15

Thanks,


P.S.: Sorry with my bad english
public class pessoa {
private String nome = "Cassiano Tartari";
private String url = "www.cassianotartari.eng.br"
}
User avatar
cassianotartari
Developer
Developer
 
Posts: 28
Joined: Thu Aug 28, 2008 3:42 pm

Top

Postby MrSnowflake » Thu Oct 02, 2008 2:06 pm

Activity.finish() will close (and thus hide an activity).
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby cassianotartari » Thu Oct 02, 2008 2:28 pm

But when I construct again the form if some text was entered before the finish() will not appear. Correct ?

Or I will have to use the put extras ?
public class pessoa {
private String nome = "Cassiano Tartari";
private String url = "www.cassianotartari.eng.br"
}
User avatar
cassianotartari
Developer
Developer
 
Posts: 28
Joined: Thu Aug 28, 2008 3:42 pm

Postby MrSnowflake » Thu Oct 02, 2008 2:34 pm

I guess so.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby cassianotartari » Thu Oct 02, 2008 9:20 pm

But how I can pass some flag to the back activity to know what to do(in this case pass a
a coordinate to the form).

When I invoke the finish() with the action of my button how I can pass data, in onDestroy() but how ?
public class pessoa {
private String nome = "Cassiano Tartari";
private String url = "www.cassianotartari.eng.br"
}
User avatar
cassianotartari
Developer
Developer
 
Posts: 28
Joined: Thu Aug 28, 2008 3:42 pm

Postby plusminus » Fri Oct 03, 2008 12:19 am

You could save it in "SharedPreferences" / "SQLiteDatabse" or pass the data back to the creator with setResult(...);

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby MrSnowflake » Fri Oct 03, 2008 10:18 am

Or you could use startSubActivty and wait for it to return a value. Take a look at the NotePad example in the docs.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 14 guests