i'm working on an Android/iOS Application. When the Keyboard opens up for the login (username and password) all gets shrinked together and it looks like this:
normaly it should not be compressed. It should move up, and give me a clear view on what i'm typing.
Yes, so i don't know, what to do. I tried to work with percentages in the whole app (width/height) - maybe this is the reason, why my View gets not moved up but shrinked?
I looked around here at stack and found some suggestions like:
<activity
...
android:windowSoftInputMode="adjustPan">
</activity>
or adjustResize instead, but nothing of that worked for me. On iOS all works fine. What i want the view to do is that he just moves a bit up, and nothing gets resized.
I hope you can help me and if you need more information, please let me know, i'll update or comment my Question then.
Cordova 3.5
jQuery/jQuery-Mobile
Plugins: Camera/Console/Device/Dialogs/File-Transfer/File/inappbrowser/Splashscreen/Statusbar/vibration/geolocation/network-information
Eclipse with Genymotion emulator
Devices: Galaxy Note 10.1, 4.4.2; Xperia Z2 4.4.2
This is what my Androidmanifest looks like:
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="1.0" package="de.*****************.de" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:screenOrientation="portrait" android:label="#string/activity_name" android:launchMode="singleTop" android:name="********" android:theme="#android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustPan">
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="20" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
</manifest>
I was stuck with the same problem, few days ago.
As you said, you have given height and width in percentage.
When the android keyboard appears the window is resized and its height is the screen size excluding the keyboard size.
Giving height in percentage to the main container of your page, (i.e. to the body tag) will shrink the height of your page when the keyboard appears,
Setting the min-height for the body tag once on document.ready worked for me.
$(function(){
$("body").css("min-height",$(window).height())
});
Add this In your manifest .I hope it will works. For more information Do Click HERE
android:windowSoftInputMode="stateUnchanged|adjustResize"
Related
We are trying to submit a TV only android app to Google play store, but the opt-in for tv is rejected because:
No full-size app banner
Your app does not contain a full-size app banner or is it not visible in the launcher. We are targeting 1080P, which we consider xhdpi. Apps should include the banner in the xhdpi (320 dpi) drawables folder with a size of (320px × 180px). Please refer to our Home Screen Banner and UI Patterns documentation.
The title should help users identify apps in the launcher. Please refer to our Visual Design and User Interaction documentation for more information.
For example, your banner does not fill the entire banner space. You can refer to the attached screenshot for additional information
They provided a screenshot, although it doesn't display like this according to our tests:
The banner provided is exactly the correct dimensions, in the drawable-xhdpi directory, saved as 320dpi. Google are unable to help us past this point and we are unsure how to proceed.
Here is the AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage">
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature
android:name="android.software.leanback"
android:required="true"/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:allowBackup="false"
android:theme="#style/AppTheme"
android:banner="#drawable/banner"
>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".TvActivity"
android:label="#string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category
android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
What could be causing this? Any help appreciated!
I am targeting api 10. On my droid maxx (4.4) there is this clickable but empty bar that appears on the side of the screen as seen here: http://i.stack.imgur.com/TSjmk.jpg . On my Nexus S (4.1.2) the bar is not present. On my friends Nexus 4 (4.4) he has a bar, but it contains the phones main buttons, the nexus 4 doesn't have off-screen buttons as mine does.
If I target api19, the bar goes away on my droid maxx, obviously thats not really a solution.
The bar renders on top of my application, and is just visually undesirable, so it's a real problem. What this bar is called and how I can get rid of it? Thanks.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.logicaldreams.edensharbor2"
android:versionCode="1"
android:versionName="1.0">
<application android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:allowBackup="true" >
<activity android:name="edensharbor2"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:configChanges="keyboardHidden|orientation"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
I am trying to make my app fill the screen for normal displays, but this is the result when I boot it up on my Samsung Captivate i897: http://oi39.tinypic.com/2qamhqd.jpg
The screen's width is filled correctly, but not the vertical side. When I set android:anyDensity to "true" in androidmanifest.xml, the app's screen is fully shown, but only on the bottom-left corner of my screen: http://oi44.tinypic.com/29w7n9v.jpg
Can someone tell me how to make the app fit to screen?
Also, when an animation that takes up the whole screen is played, I get blurred and stretched images around the screen, as seen in the first screenshot link. This does not happen when I run it through moai.exe's OpenGL simulator (I am using moai-sdk and rapanui-sdk to develop my app. I imported them both into eclipse to create the apk file). I don't understand what could be the problem.
Here is how my androidmanifest.xml looks:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
android:versionCode="1"
android:versionName="1.0"
package="com.gamefromscratch.moai">
<supports-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="false"
android:xlargeScreens="false"
android:anyDensity="false"/>
<application
android:icon="#drawable/icon"
android:debuggable="true"
android:enabled="true"
android:persistent="false"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<!-- Moai -->
<activity
android:name="MoaiActivity"
android:label="#string/app_name"
android:screenOrientation= "portrait"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.ziplinegames.moai.MoaiMoviePlayer"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation"
android:theme="#android:style/Theme.NoTitleBar">
</activity>
<receiver android:name="com.ziplinegames.moai.MoaiLocalNotificationReceiver"></receiver>
<!-- EXTERNAL DECLARATIONS: Placeholder (DO NOT MOVE OR REMOVE) -->
</application>
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
<!-- Moai -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- EXTERNAL PERMISSIONS: Placeholder (DO NOT MOVE OR REMOVE) -->
<uses-configuration android:reqTouchScreen="finger" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="true" />
</manifest>
following attribute used for supports for multiple screen size, try this
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
To avoid image blurring problem you have to create separate images with more pixel for drawable-hdpi,drawable-xhdpi and drawable-xxhdpi folder.
you can create separate layout folder for different size layout-large,layout-xlarge.
try this also, this will solve orientation problem
android:screenOrientation="unspecified"
android:configChanges="keyboardHidden|orientation"
hope this will sove your problem.
Hello everyone I am new in Sherlock Actionbar I am having a very strange problem in my sample application. The problem is that when I rotate to landscape from the portrait its behavior is normal but when I rotate back to portrait mode the layout does not change back to portrait mode.
Below are the screen shot of the problem I am facing.
OriginalScreen
Did rotation to Landscape
Again rotated back to original orientation i.e. Portrait Mode
As you can see that on the third picture the problem I am facing.
I am using the latest version of ActionbarSherlock library.
Edited
My manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.actionbar_sherlockexample"
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.actionbar_sherlockexample.MainActivity"
android:theme="#style/Theme.Sherlock"
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>
Thanks
This is an issue with emulator . If you will run it on real device , it will work fine .
I've got an edit text on top of a list view and when I launch this default activity in android 1.6 the soft keyboard always show up by default. If i make focusable false it won't show but then I can't click it. Would a combination of focusable = false, focusableontouch = true resolve this or has anyone else run into this issue?
Note- on Android 2.x this is a non issue when I launch the app
In your AndroidManifest.xml, set this property inside activity tag: android:windowSoftInputMode="stateHidden".
For example:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="..."
android:versionCode="..."
android:versionName="..." >
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="..."/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:allowClearUserData="true">
<activity
android:label="#string/app_name"
android:name="..."
android:windowSoftInputMode="stateHidden" >
...