没有在Moto Xoom平板电脑上启动应用程序

时间:2016-01-25 04:57:55

标签: android xamarin motorola-droid

我正在使用Android应用程序进行开发,它只适用于没有打开的Moto Xoom(10英寸标签)上的每个手机和平板电脑,只显示白色屏幕。

AndroidManifest

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionName="2.4" package="lionbridge.tms.notification" android:versionCode="5">
    <uses-sdk android:minSdkVersion="15" />

    <application android:label="TMS Tasks" android:icon="@drawable/Icon"></application>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.INTERNET" />
</manifest>

Splashscreen.cs

namespace Mobile.UI.Droid
{
    [Activity(
        Label = "Mobile Tasks"
        , MainLauncher = true
        , Icon = "@drawable/icon"
        , Theme = "@style/Theme.AppCompat.Light.NoTitle"
        //, Theme = "@style/Theme.Splash"// Theme = "@style/Theme.AppCompat.Light"
        , NoHistory = true)]
        // ScreenOrientation = ScreenOrientation.Portrait)]
    public class SplashScreen : MvxSplashScreenActivity
    {
        public SplashScreen()
            : base(Resource.Layout.SplashScreen)
        {
        }
        protected override void OnCreate(Android.OS.Bundle bundle)
        {
            base.OnCreate(bundle);
            if (IsTablet(this))
            {
            }
            else
            {
                RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;
            }
        }

        #region Check android device/Tablet
        public static bool IsTablet(Context context)
        {
            return (context.Resources.Configuration.ScreenLayout & ScreenLayout.SizeMask) >= ScreenLayout.SizeLarge;
        }

        #endregion

    }
}

0 个答案:

没有答案