Android app appearing different on real device vs emulator - java

Just coding a small app which currently has a bunch of textviews all constrained together.
When running in the emulator with the same specs as the device I'm using (Galaxy Tab A) it runs perfectly fine and outputs the same as the design view in Android Studio.
However when i run the same app on the actual device the app appears to be zoomed in with the bottom and right edges cropped.
Any ideas what might be causing this?
Thanks for any help

Android powers hundreds of device types with several different screen sizes, ranging from small phones to large TV sets. Therefore, it’s important that you design your application to be compatible with all screen sizes so it’s available to as many users as possible. It must optimize the user experience for each screen configuration.
Checkout this awesome tutorial about Designing for Multiple Screens for more details.
Starting with Android 1.6 (API Level 4), Android provides support for
multiple screen sizes and densities, reflecting the many different
screen configurations that a device may have. You can use features of
the Android system to optimize your application's user interface for
each screen configuration and ensure that your application not only
renders properly, but provides the best user experience possible on
each screen.
Check this android official document for Supporting Multiple Screens to get more information about it.

Related

Left-handed game users on an Android application

We are building an Android application for a scientific research and while in the final stages of the application, the researches came up with the question of left-handed users. The application consists of few screens in landscape mode and there is one screen with a game and there is a joystick in the right-hand side of the screen. This raised our wonder about the way that left-handed people use applications which feature games.
Is there any need to flip the screen (mirror image) in order for them to use? Or does left-handed users use gaming applications with the same controls for right-handed users? And if they don't - is there any tool available for android development in order to do this fix efficiently?

Android-Wear icons are not showing up

So I developed an AndroidWear App with the LG G-Watch, the icons and everything else were working properly. Now I switched to the Asus Zenwatch 2 and could deploy my app without problems, but there are all the icons missing. The biggest difference, which could lead to such a problem is the resolution since the LG has just 280x280 and the Asus 320x320. Can I address this with different icon folders like I would do it for Smartphones? I can't find any information related to the different resolutions in the google guidelines.
Please try going through Wear App Quality. A couple of quality criteria are given which will help ensure a great user experience for your apps.
There are Functionality criteria to ensure that your app is configured correctly and provides the expected functional behavior. These criteria must be checked specially for wearable apps that are dependent on a handheld app.
Aside from that, to provide a consistent, intuitive, and enjoyable user experience on wearables, Visual Design and User Interaction have also criteria which ensure that your app follows critical design and interaction patterns.
I'm actually new to Android Wear so I hope that helps. Happy coding!

Why my project works on android but not on ios in codenameone?

I work on a big project with codenameone(i can't attach my codes because it's really big). I get android app and it's works on android devices. But recently i get ios build for this project and it's not working on ios device(just showing a white page instead of map).
My project is a map-framework that render tiles and ... on graphics(i used graphics class for drawing, transforming, writing text and more).
I used input stream for working with file because of File not supported.
I need a solution to how debug and find my problem about ios build(why tiles doesn't showed).
In fact i don'n know anything about ios and objective-c.
Thanks in advance.
Most of the logging functionality that allows inspecting issues is for pro developers (you can try the trial) its discussed in this video (mostly focused on crashes): http://www.codenameone.com/how-do-i---use-crash-protection-get-device-logs.html
From your description I would guess you created a really large mutable image (larger than screen bounds) and are drawing onto that. This would be both slow on iOS (and on newer Android devices) and might actually produce that result if the image exceeds the maximum texture size of the device.
If that is not the case you would need to explain what you are doing more precisely.

Changing UI in Java Android

I have an application in my android tablet. The user interface of that application is really bad. I want to make another level -if this word is correct- and use the same application. I won't add new operations, functions. I just want to make the buttons, labels and texts look better.
Is it possible to re-design the UI, or make a layer between the user and application?
Thank you very much.
EDIT: I don't have the source code, unfortunately.
Use dip in your xml views instead of px.
To make it look better design it for different screens . Make folders for layouts like
1.layout-small( for phones like samsung galaxy mini)
2.layout-medium(for phones like samsung galaxy note)
3.layout-large(7-10 inch tablets)
4.layout-xlarge(10+ inch devices)
Make sure that file names and views ids should be same to avoid null pointer exceptions in run time . Just play with views attributes and sizes in xml files.
For further details see this
Realistically, It would be tough to changes the UI without sourcecode, as you would not know hows these UI controls will work and look. In simple way you can change the orientation of activities as per need such as portrait to landscape in menifest file, add images for different resolution and adjust padding and all. But this wont be good solution.
check this link, would help you bit Android App for Tablet and Phone
You need to check this out first and foremost:
http://developer.android.com/guide/practices/screens_support.html
Android is designed to be used on multiple devices. It allows you define different layouts (UI's) for devices of different sizes and screen resolutions.
You can use stuff like Fragments as well to divide your apps functionality into smaller pieces and display only those parts which suit the current device.

How do I develop Java games for phones?

How do I begin developing J2ME games for mobile phones?
Are any libraries available that can render pixel fonts for text? - for text games
Are 2D graphic libraries available that can draw animated bitmaps? - for isometric and tiled games
Any are 3D engines available with texture mapping & lighting? -- for racing and flying simulators
And regarding screen sizes:
What screen size to choose initially for good market penetration?
How to manage game source code, in different screen sizes? Make separate branches?
I'm new to J2ME programming, so any links you can give me to start off would be great.
Game Programming Crash Course to begin developing simple bitmap games.
Screen size of 240x320 pixels is where most j2me-enabled phones are these days.
Obviously, touchscreen phones usually have bigger screens than this. A VGA size of 480x640 is just around the corner for high-end phones.
Different screen sizes are usually handled by having generic code that can handle any screen size and can modify layout depending on in-Jar configuration files. You then simply make several jar files, all containing the same compiled code but different values in the configuration files.
For 3D graphics, a lot of phones these days support http://www.jcp.org/en/jsr/detail?id=184.
Recent Sony-Ericsson phones also have http://www.jcp.org/en/jsr/detail?id=239 which should be easier to use if you already know OpenGL. 3D performances vary widly between phones that contain a hardware accelerator chip and those that don't.
Animated bitmaps on J2ME usually means making you're own redrawing thread to refresh the screen. The only image format officially supported by the MIDP specification is PNG.
Because of this last fact, if you want to create your own pixel font, you are pretty much going to need to have each character in a PNG image.
You might want to look at LWUIT, an open source library published by Sun.
I know this isn't a direct answer to your question, but I think J2ME is slowly on the decline, and Android is taking its place. You may want to take a look at the iPhone as well, even though it's not Java. For the iPhone, you're looking at 480x320 screen size and you can use Cocos2D for the 2D games.
Also check out Kevin Glass's website, which has a lot of notes about 3-way instantaneous deployment to Applet, Android, and iPhone. More details are here.
There's this incredible list of open source J2ME libraries that do all sorts of things, like UI, Graphics, Games, 3D, Bluetooth, SMS, IM, Math, Security, Databases, XML .. even Dev Tools.
Java ME Open Source Software - ngPhone

Categories