Android virtual KeyBord and Edit Text - java

I have a problem with my virtual keyboard, it hides the text boxes in which I want to write
my xml manifest, I added code to try but nothing works (Still the keyboard hides text boxes ):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="
http://schemas.android.com/apk/res/android"
package="com.example.Pointage"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:windowSoftInputMode="adjustPan"
>
<activity
android:name="com.example.test.MainActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.test.Activity2"
android:label="#string/title_activity_activity2"
>
</activity>
<activity
android:name="com.example.test.Bdd"
android:label="#string/title_activity_bdd" >
</activity>
</application>
</manifest>

try this:
android:windowSoftInputMode="stateVisible|adjustPan"
or
android:windowSoftInputMode="stateVisible|adjustResize">
Reference link

This should work
android:windowSoftInputMode="adjustPan"

Related

Android Manifest Attribute "name" File Error

I was following the Dev guide on Vunglee:
https://github.com/Vungle/vungle-resources/blob/master/English/Android/3.2.x/android-dev-guide.md
Eclipse gives me this error in my manifest file
Attribute "name" bound to namespace "http://schemas.android.com/apk/res/android" was already specified for element "activity".
My code is :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kilobolt.FlyingJesus"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="5"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.kilobolt.ZombieBird.MainActivity"
android:name="com.vungle.publisher.FullScreenAdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Please help me, what is the problem. And i'm newbie in java.
can't give two names to same activity. Error is in below lines
android:name="com.kilobolt.ZombieBird.MainActivity"
android:name="com.vungle.publisher.FullScreenAdActivity"
As kalyan pvs mentioned in comment, check for other duplicate attributes also.
Do not use same tag to declare two Activity in AndroidManifest file,
Make 2 different tag to declare it like this:
<activity android:name="com.kilobolt.ZombieBird.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.vungle.publisher.FullScreenAdActivity"
android:configChanges="keyboardHidden|orientation|screenSize">
</activity>

No launcher activity found in eclipse java android [duplicate]

This question already has answers here:
What does it mean "No Launcher activity found!"
(17 answers)
Closed 8 years ago.
I'm getting something that looks like this:
"No Launcher activity found!
The launch will only sync the application package on the device!"
I'm not sure how to fix this. My AndroidManifest looks like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="20" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
</application>
</manifest>
Any help would be greatly appreciated. Thanks!
You need to add the activity to your manifest. For example, if your initial activity is called MainActivity:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.helloworld.MainActivity"
android:label="Main Activity!" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Edit: The above shows an activity that is also being used as a launcher. Here is an example of a regular activity also being added to the manifest.
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.helloworld.MainActivity"
android:label="Main Activity!" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.helloworld.SecondActivity"
android:label="My second activity"
android:parentActivityName="com.example.helloworld.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.helloworld.MainActivity" />
</activity>
</application>
You should add your acivities to the manifest file.
For Example:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="<Package><ClassName>"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</applicaion>
Whenever you create Android Project in Eclipse it automatically generates a class called MainActivity which extends activity and generates Manifest file for you with a default entry of your MainActivity. Whenever you create a new class that extends Activity then you have to manually enter your activity in your manifest. You can change your your intent filter any time and you can set it to any activity and that activity will be your launcher activity of the app. This is a default Manifest file :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
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="com.example.test.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Android error: "APK NOT INSTALLED" in Android 2.3.x

My app seems to working in Android 4.0 also in emulator. but when I tried in other device(2.3) it showing "APK NOT INSTALLED" :(
Here is my manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ex.live"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
android:name="com.ex.live.Main"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED how to fix?

Today, I was working on an app. Testing testing testing.. and out of the blue, the app says Manifest Malformed. What is did first was undo what I changed, but that didn't help. I then copied a copy from this morning, but that was no good either.. Hope you guys can help, my manifest is below!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lahmob.swagdaddymcnugget"
android:versionCode="2"
android:versionName="1.1" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.lahmob.swagdaddymcnugget.MainActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.lahmob.swagdaddymcnugget.SplashScreen"
android:label="#string/app_name" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name="com.lahmob.swagdaddymcnugget.Webview"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.lahmob.swagdaddymcnugget.MusicPlayer"
android:label="#string/title_activity_music_player" >
</activity>
</application>
</manifest>
Because requested, the LogCat
In the meantime, I fixed the problem myself. Turned out I just had to remove a corrupt lib file.
-Laurens

Android, Google Play - "The server could not process your apk. Try again." error

i repeatedly tried to upload my app, but every time upload crashed. Before uploading i cleaned and built project, then i exported it.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.inzerujem"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
<application
android:icon="#drawable/icon"
android:label="#string/app_name" >
<activity
android:name=".InzerujemActivity"
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="TopicActivity"
android:screenOrientation="portrait" >
</activity>
</application>
</manifest>
Thank you for answers.
package="com.android.inzerujem"
There's your problem. You are NOT allowed to use com.android for package names.

Categories

Resources