Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/191.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在平板电脑上使用相同的android应用程序,我可以一步一步地做什么?_Android - Fatal编程技术网

在平板电脑上使用相同的android应用程序,我可以一步一步地做什么?

在平板电脑上使用相同的android应用程序,我可以一步一步地做什么?,android,Android,如何让我的应用程序支持所有屏幕大小(智能手机和平板电脑),因此我的所有图像都在res/drawable hdpi中,那么我是否需要将相同的图像放在所有drawable文件夹中,但尺寸更大,在清单文件中我应该做什么 manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.trysearch" android:versionCode="1" android

如何让我的应用程序支持所有屏幕大小(智能手机和平板电脑),因此我的所有图像都在res/drawable hdpi中,那么我是否需要将相同的图像放在所有drawable文件夹中,但尺寸更大,在清单文件中我应该做什么

manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.trysearch"
    android:versionCode="1"
    android:versionName="1.0" >
<supports-screens android:normalScreens="true"
    android:largeScreens="true" android:anyDensity="true">
</supports-screens>
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.CALL_PHONE"/>
    <uses-permission android:name="android.permission.SEND_SMS"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/background"
        android:label="@string/app_name"

        android:theme="@android:style/Theme.NoTitleBar" >
        <activity
            android:name="com.example.trysearch.SplashMain"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
manifest xmlns:android=”http://schemas.android.com/apk/res/android"
package=“com.example.trysearch”
android:versionCode=“1”
android:versionName=“1.0”>

您可以为手机和平板电脑创建不同的布局文件。对于平板电脑,您应该在res文件夹中创建额外的布局文件夹,称为layout large(对于平板电脑),对于手机,有默认布局文件夹,同时对于横向模式,您可以为手机布局横向创建一个名为layout large landscape(平板电脑)的文件夹

也在Manisfest文件中进行更改

<supports-screens android:anyDensity="true" />

谢谢,但最好还是用相同的图像名称再次展示我自己的平板电脑所有布局