Issue
From one activity my app will go to a second activity (I send some of this activities code here). This activity has a mapview. because that I have 2 mapview in my app I should to use 'Process' attribute in this activity.but when I use this attribute before lunching the activity app displays a black screen for some seconds and then my ProgressDialog and activity will display. I wanna that this black screen not appear
This is the definition of my class:
[Activity (Label = "PropertyShowActivity",
Process =":PropertyShowMapActivity")]
public class PropertyShowActivity : MapActivity
{.....}
The onCreate code of this activity is:
protected override void OnCreate (Bundle bundle)
{
try {
base.OnCreate (bundle);
RequestWindowFeature (WindowFeatures.NoTitle);
PD = new ProgressDialog (this);
PD.SetMessage ("Please Wait...");
PD.Indeterminate = true;
PD.SetCancelable (false);
PD.Show ();
currentproperty = new Property ();
SetContentView (Resource.Layout.PropertyShow);
mapLayout = FindViewById ,,,,<LinearLayout > (Resource .Id.PrptyLocationOnMapLayout);
mapLayout .Visibility = ViewStates.Gone;
if (RplSettings.Sitename == string.Empty) {
RplSettings.LoadAllSettings (this);
}
action = Intent.GetStringExtra (AppConstants.Action);
Pid = Intent.GetLongExtra ("Pid", 0);
Common .MenuInitialize (this, "Property");
Common .MenuEventInitialize (this);
AssignBottomActionBarEvents ();
FindElemnts ();
if (Pid == 0)
Pid = Intent.GetIntExtra ("Pid", 0);
if (action == string.Empty) {
PD.Hide ();
Finish ();
}
if (action == AppConstants.DownloadProperty) {
LoadPropertyData ();
} else if (action == AppConstants.OfflineProperty) {
OfflineProperty = true;
//var path = Intent.GetStringExtra (AppConstants.PropertyFilePath);
//currentproperty = IOAddOn.ParsePropertyJsonString (UTF8Encoding.UTF8.GetString (Property.LoadPropertyFromSD (path)));
LoadPropertyData ();
}
} catch (Exception ex) {
Common.HandleException (ex);
}
}
and also the logs of ddms is: when I define my class such as below it works fine:
[Activity (Label = "PropertyShowActivity")]
public class PropertyShowActivity : MapActivity
{.....}
Solution
I resolved it bur running two app in same process.But after going to second activity i saved the state of new app in application class of app. and then when I back tp first map activity in OnResume i change the state of mapview to the past state. It work right.
Answered By - user1682893
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.