Android Virtual Keyboard affect screen rotation ( Using Cocos Creator to build ) - keyboard

I using Cocos Creator 3.5.2 for this project.
When I start testing input text field in android phone either in app or web browser, after the virtual keyboard appear and I try rotate screen from landscape to portrait, the keyboard got change but the screen layout dint resize still is landscape but only smaller n at top.
It need to close the keyboard then the screen layout will start resize and this is in app.
Any idea that can cause this happen?
And any solution for it.

Related

Why is my Android Studio emulator screen only visible in the task bar

I am trying to run my Android Studio applications using my emulator. But when i try to run it emulator only shows up like this:
Emulator stuck in taskbar - Windows 10
I have created multiple Virtual devices though..and all of these have same issue. Sadly, I have no control over my emulator except if i hover over it then only the screen for emulator is displayed but the view is minimized and as soon as I move my mouse away or even if i double click the screen nothing happens. By the way i'm using windows 10 and Android Studio 3.6.3. My problem is similar to Android Studio emulator gets stuck minimised in task bar. But this question has not been helpful to me in fixing my problem.
Mabye it opens somewhere else: Try the following:
- Press SHIFT+CTRL
- Right Click on the Program showing up in the taskbar.
- Select the "Move" Window option
- Use the keyboard (Left Arrow/Right Arrow) <-/ -> keys to move the window to the center of the screen.
- Try holding down the left arrow key for a while to see the Window outline. Try moving right/up/down if the window outline is still not visible.
- Hit enter when you can see the Window outline move to the center of the screen.
It appears that the desktop extends beyond the Screen Display and the program window seems hidden. Moving the Window either to the Left / Right / Top/ Bottom of the screen helps.
Coppied from here.

Virtual buttons not appearing on emulated Android 4.2 system

I have created an Android 4.2 AVD. For the need of my current project, the main screen orientation is landscape. The software keys option is selected.
The mode is set to xhdpi, like a Galaxy Nexus phone.
As I start the emulator, I see a black stripe on the right where the buttons should appear, but it remains black. Thus, there is no way to trigger a Back action since the emulated physical keys are disabled.
The problem can be fixed by configuring the emulator in portrait mode then rotate it once started; the buttons appear as expected. This causes problems since the window is automatically scaled down to fit on my monitor; I did not find any shortcut to restore 1:1 scaling at runtime, after the rotation is done. This is important since I would like to see pixel-perfect results.
I am using SDK version 21 and platform-tools version 16.0.2, as updated yesterday.
Found the solution myself... this is a workaround that allows getting 1:1 scale and the software buttons working.
Leave the AVD (Galaxy Nexus or cloned from it) on portrait mode.
Run the emulator from the command line, using the -scale 1 option; this is the magic that forces 1:1 pixel perfect ratio even if the window does not fit in screen at startup. By default, automatic downsizing happens to fit the monitor.
Rotate the display using Ctrl+F11 or Ctrl+F12 to get landscape mode.

Splash screen in Windows Store apps

I am developing Windows Store Apps for Tablet using VS2012. Right now i am creating splash screen for my application. My requirement is the splash screen should be display full screen in my app.
but it is working as Center of the screen. Can any one help regarding this...
The answer is that there is no way to create an official splash screen that is full-screen. A splash screen has to use a 620 x 300 pixel image, where it is a normal splash screen or an extended splash screen. However, you can match the background color around the splash screen to the color of the splash screen image (using the instructions you already found), which makes it appear like a full-screen image, even though much of it is just color.
AFAIK a splash screen has to be centered, but maybe a valid work around would be to create a start page (regular xaml) and have this one displayed as initial screen as soon as the splash screen is gone.
But this would mean that your startup time has to be quite fast.
Maybe it's an option for you.
Open the "package.appxmanifest" manifest file.
The manifest should automatically open in the Microsoft Visual Studio Express 2012 for Windows 8 Manifest Designer.
Open the Application UI tab and scroll down to the Splash Screen
section. If you are still using project defaults, you should see the
"images\splashscreen.png" path in the Splash Screen field. If you
open "package.appxmanifest" in a text editor, you should see
SplashScreen element as a child of the VisualElements element. For
example, the default splash screen markup in the manifest file looks
like this:
XML
{ <SplashScreen Image="images\splashscreen.png" /> }
Change the splash screen image by using the Browse... button and
confirm that the image was added to your Visual Studio project.
Important The splash screen image you choose must be 620 x 300
pixels using a 1x scaling factor.
In the Background Color field of the Splash Screen section, set the
background color to display with your splash screen image. You can
enter either the name of a color or '#' and the hex value of a color.
Setting a background color for your splash screen is optional. If you
do not specify a color, the splash screen background color defaults
to the Tile background color (the color in the Background Color field
of the Tile section in the Application UI tab). If you open
package.appxmanifest in a text editor, the Tile background color is
specified via the BackgroundColor attribute of the VisualElements
element.
my workaround is make a 620x300 splash .png image with alpha background, so its not a full 620x300 image. the image itself is just a 300x300 logo. my suggestion is just make a small center image (your app logo or something else) and make it blend to the background (gradient or alpha)

how to run one mobile apps on multiple android phone?

I was created simple currecnyConverter apps in android But I got Problem is that when i did run this apps Nexus S(4.0",480 * 800:hdpi) emulator in Protrait is working fine but same apps run on landscape mode my button and component not fit on the screen so I want run my apps on any mode and any android version.please
can anybody give me answer.
Thanking you
You have to go through the below page:
http://developer.android.com/guide/practices/screens_support.html
You have to design the layout for landscape mode in layout-land folder with same name as in your Portrait mode.
For more info see the above page.
Thanks.
You need to create different layout for landscape and portrait.
Follow this
res/layout/my_layout.xml // layout for normal screen size ("default")
res/layout-small/my_layout.xml // layout for small screen size
res/layout-large/my_layout.xml // layout for large screen size
res/layout-xlarge/my_layout.xml // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation
res/drawable-mdpi/my_icon.png // bitmap for medium density
res/drawable-hdpi/my_icon.png // bitmap for high density
res/drawable-xhdpi/my_icon.png // bitmap for extra high density

Android wallpaper also sliding left and right when we swipe the home screen

I want to develop a new home screen application for android. I saw the default home screen in my android 2.3.3 device, when ever I swipe the home screen left and right, the background wallpaper also sliding left and right. What is that view? How to get the same effect in an app?
Is it ViewPager? I checked the ViewPager class, but I didn't found any common background image for all views in that.
You probably want to use a canvas with a draw-able, then detect the users swiping and animate it in the background. It is likely that the default android backgrounds are doing the same. You wont be drawing the unseen portions of the view.
http://developer.android.com/guide/topics/graphics/2d-graphics.html
I suggest doing their lunar lander tutorial to learn how to use the canvas first.
You will make a canvas the background to your app and then lay your other ui elements on top of it unless you make the ui based inside the canvas.

Resources