I created an alternate layout in Eclipse
res/layout-land/main.xml
I am using Hello Android 3rd Edition to learn Android.
Am I missing anything?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.oneorangetree.sudoku"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Sodoku"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".About"
android:label="#string/about_title"
android:theme="#android:style/Theme.Dialog">
</activity>
</application>
</manifest>
There's a setting "auto-rotate" in setting "display" on the device. Check that it's activated.
You can use Ctrl + F12.
See the possible options here
CLICK HERE
Related
I'm compiling an app developed on android V2.2 on a phone made for V4.4
I need to bring up the options menu with the "Physical menu button" (according to the V2.2 app instructions) but my phone does not have a physical menu button. the virtual button also does not appear.
Any recommendations on how to bring up the menu?
EDIT:
here is the manifest of the app:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.inte.indoorpositiontracker"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<application
android:name="com.inte.indoorpositiontracker.IndoorPositionTracker"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MapViewActivity"
android:label="#string/title_activity_main"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MapEditActivity"
android:label="#string/title_activity_main"
android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.inte.indoorpositiontracker.MapViewActivity" />
</activity>
</application>
</manifest>
Have a simple app with 2 activities. Works on USB / SYNC, but when I export it to get an .apk file, Mainfest.xml throws out any reference to the 2nd .
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.easy"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Splash" android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".StartingPoint" android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.easy.STARTINGPOINT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
The 1st activity (.Splash) gets deleted during compile. I've had this problem with my first project so I started over with a very simple one to see if its a continuing problem or my first project.
Seems to be a continuing problem.
I have an Android app in which the first screen is a menu display. Before it gets to the menu display though it displays a page with the launcher icon and "Main Activity" at the top. How do I prevent this display? Manifest file has this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.menu"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
--- edit
So the class that displayed the menu was called MainActivity.java. Maybe not a good idea, if only because it is not a good practice. So I renamed it to MenuActivity.java and changed the manifest accordingly(below). But the behavior is still the same.
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MenuActivity"
android:label="#string/menu_activity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
What I'm understanding is that you don't want the ActionBar to appear at all in your MenuActivity. Since your target API is 11, you can add android:theme="#android:style/Theme.Holo.NoActionBar" to the Activity Declaration.
<activity
android:name=".MenuActivity"
android:label="#string/menu_activity"
android:theme="#android:style/Theme.Holo.NoActionBar" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.menu"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".YourCustomActivity"
android:label="#string/custom_activity_title" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I create an Android Application on eclipse , when i want to run it on the Emulator I get The message saying
MyApplicationName.apk installed on device
So normally every thing fine.
But when i want to start my application i did not find it's icon.
And when i go to parametres then manage applications i find it there.
Can anyone tell me why i am not able to find the application's icon on the Emulator ?
here is the manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.enis.testandroid"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="MainActivity" />
</activity>
</application>
You have missed to add a Launcher in your Manifest file,
<application
android:icon="#drawable/download" <!-- Check this one -->
android:label="#string/app_name" >
<activity
android:name=".abc"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <!-- Check this one -->
</intent-filter>
</activity>
<activity android:name="abc" >
</activity>
<activity android:name="def" >
</activity>
</application>
<application
android:name="com.x.y.z"
android:icon="#drawable/ic_launcher"
android:label="#android:string/abc" >
In manifest, make changes according to your drawable folder icon. Also make sure to use small case for drawable.
Some people that use my application are complaining that after the update, the launcher icon went missing so they can't start the game. I myself don't have that problem. All ic_launcher.png images are in the drawable maps and I didn't change them.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="wetenschappelijk.project"
android:versionCode="36"
android:versionName="3.0.0" >
<uses-sdk android:minSdkVersion="7" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:label="#string/app_name"
android:name=".GalgjeActivity"
android:configChanges="orientation|keyboardHidden"
>
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MenuActivity"
/>
<activity
android:name=".GameActivity"
/>
<activity
android:name="wetenschappelijk.project.Settings"
/>
<activity
android:name="wetenschappelijk.project.Multiplayer"
/>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<meta-data android:value="a14ef899d6be24a" android:name="ADMOB_PUBLISHER_ID"/>
</application>
if there is no icon name :ic_launcher..
at that time the there is default icon name :icon.png already there
Edit:
As I showed in your manifest file .
you didn't display API minimum version.
may be that is issue:
<uses-sdk android:minSdkVersion="8" />