在第一次安装后第一次运行时,Sensor横向活动显示非常缓慢 导入android.os.Bundle; 导入android.support.v4.app.FragmentActivity; 公共类WelcomeActivity扩展了FragmentActivity{ 私有静态最终字符串TAG=“WelcomeActivity”; @凌驾 创建时受保护的void(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcome); } }

在第一次安装后第一次运行时,Sensor横向活动显示非常缓慢 导入android.os.Bundle; 导入android.support.v4.app.FragmentActivity; 公共类WelcomeActivity扩展了FragmentActivity{ 私有静态最终字符串TAG=“WelcomeActivity”; @凌驾 创建时受保护的void(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcome); } },android,screen-orientation,Android,Screen Orientation,当我的应用程序的第一个活动使用“Sensor横向”设置方向时,我的应用程序在安装后第一次运行非常缓慢。谁能告诉我为什么以及如何修复它? 添加一个条件:我的应用程序的方法超过65k。当我设置android:screenOrientation=“纵向”时,欢迎活动的视图将在第一次安装后立即显示。同时发送您的主要活动代码。也许问题就在那里。再加上布局。“活动”类似乎正常。@已添加了布局。FrameLayout中有动画,还有一个必须缩放的ImageView。我建议您删除动画,隐藏图像并检查横向模式现在是

当我的应用程序的第一个活动使用“Sensor横向”设置方向时,我的应用程序在安装后第一次运行非常缓慢。谁能告诉我为什么以及如何修复它?
添加一个条件:我的应用程序的方法超过65k。当我设置android:screenOrientation=“纵向”时,欢迎活动的视图将在第一次安装后立即显示。

同时发送您的主要活动代码。也许问题就在那里。再加上布局。“活动”类似乎正常。@已添加了布局。FrameLayout中有动画,还有一个必须缩放的ImageView。我建议您删除动画,隐藏图像并检查横向模式现在是否正常运行。@谢谢,我会试试。
<activity
    android:name=".WelcomeActivity"
    android:configChanges="orientation|keyboardHidden|screenSize|screenLayout"
    android:launchMode="singleTop"
    android:screenOrientation="sensorLandscape"
    android:theme="@style/WelcomeStyle"
    android:windowSoftInputMode="adjustPan">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
    </activity>



import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
public class WelcomeActivity extends FragmentActivity {

    private static final String TAG = "WelcomeActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_welcome);
    }

}

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/rootlayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/welcom_background">

    <FrameLayout
        android:id="@+id/bootImg_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layoutAnimation="@anim/ads_show_anim"
        android:visibility="gone">

        <ImageView
            android:id="@+id/bootImage"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:adjustViewBounds="true"
            android:scaleType="centerCrop" />

        <TextView
            android:id="@+id/adsCountDownTime"
            android:layout_width="40dp"
            android:layout_height="30dp"
            android:layout_gravity="right"
            android:layout_marginRight="10dp"
            android:layout_marginTop="10dp"

            android:gravity="center"
            android:text="@string/ads_accountime"
            android:textColor="@color/color_white"
            android:textSize="25sp" />

        <TextView
            android:id="@+id/channelApkDwnButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|center_horizontal"
            android:layout_marginBottom="50dp"
            android:gravity="center"
            android:visibility="gone" />
    </FrameLayout>
</LinearLayout>