从一个活动我的应用程序将转到第二个活动(我在这里发送一些活动代码)。这个活动有一个地图视图。因为我的应用程序中有 2 个地图视图,所以我应该在此活动中使用“进程”属性。但是当我在午餐前使用此属性时,活动应用程序会显示黑屏几秒钟,然后会显示我的 ProgressDialog 和活动。我想让这个黑屏不出现
这是我的班级的定义:
[Activity (Label = "PropertyShowActivity",
Process =":PropertyShowMapActivity")]
public class PropertyShowActivity : MapActivity
{.....}
这个活动的onCreate代码是:
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);
}
}
而且 ddms 的日志是:当我定义我的类时,如下所示,它工作正常:
[Activity (Label = "PropertyShowActivity")]
public class PropertyShowActivity : MapActivity
{.....}