App not working on certain phones - java

People have been experiemcing a problem with my android app. Apperently what is happening is on phones such as the Droid x and cliq cupcake have been experiencing the main menu not showing the letters on the buttons and in some occasions it will cause a force close in certain sections. My buttons do have picture backgrounds if that could be the cause and the app is set for version 1.6. Not sure if either has anything to do with it. If anyone has experienced it or has any ideas I would appreciate some help. Thanks alot

It should work on every phone if you read this post carefully
http://developer.android.com/guide/practices/screens_support.html
In best practices part recommended list is here.
Use wrap_content, fill_parent, or the dp unit (instead of px), when specifying dimensions in an XML layout file
Do not use AbsoluteLayout
Do not use hard coded pixel values in your code
Use density and/or resolution specific resources
Every android developer should read that post to support for multiple screens.
Hope this helps

Related

How can i create an responsive app to all sizes in android studio

I'm really confused about this, i've been working with linearlayout only and apparently it's not responsive to all screen sizes, i looked online about some solutions and i found that people usually create diffrent xml files for diffrent screen sizes which seems like alot of work, is there any other way for doing that without going throught all of that trouble ?
what trouble? Creating individual layouts for your screen's variations in xml files is good way to separate layouts from code. Beside, you could use fragments for reusing layouts
I think you should try using other layouts, arbitrary options for designing a scalable interface, such as ConstraintLayout, you would design probably based on the aspect ratio of the screen, there are a few things. will help you, Chain, GuildeLine, .... All of it is in ConstraintLayout
More information about ConstraintLayout from Google:
https://developer.android.com/training/constraint-layout.
Some special screens need separate layouts such as Tablet, .....
best solution for doing this is constraint layout by using can build your responsive ui .
you can find some tutorials for using this layout in youtube .
or you can use google tutorial in android developer site.

Skobbler Maps. Annotations appear as black squares. Android

I'm developing an Android app that shows my different POIs with my custom design.
Usually In most cases everything is fine. But sometimes, about 5% cases there are black squares instead of my POI.
Check the screenshot please:
https://www.dropbox.com/s/tlqqczq98w926oi/ss1.jpg
I'm using for this SKAnnotationView.setView passing my custom View object with ImageView. Image can be set to ImageView via setImageBitmap in background or via setImageResource. I tried different ways. And there is no difference with choice of Bitmaps or Resources. In both cases black square can be shown.
Why it could happen? I don't see anything strange in logcat. No error messages, no warnings.
I'm checked for sure that SKMapSurfaceView.addAnnotation method is called from UI thread. Always.
I'm using Skobbler Android SDK 3.0.3.
How can I correct this issue? Or how can I detect the problem that cause this behavior?
Thanks in advance.
This issue was fixed with the latest SDK release (3.1).

Why are my PNGs ugly in Codename One?

I'm excited to roll out my first codename one app but I'm running into issues with the look of the program. On Netbeans my images great and my label backgrounds are appropriate. However, on my tablet, images have a background and my labels look odd.
The tablet image is from a Samsung Galaxy Tab 3.
Any idea how to fix this?
(Since SO won't allow me to post images, here is a link to the screenshots: http://www.pricepasta.com/random/Uglypng.jpg)
Use the Android build argument android.asyncPaint=true to use the newer rendering pipeline.
You would also need to test in the Android simulator to see the misalignment on the simulator as well. I'm assuming this is triggered by misuse of the layout managers.

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 does android understand which home screen is being viewed by the user?

I wanted to understand how does the Android OS figure out which home screen the user is viewing currently and render the appropriate icons and widgets on that screen based on the user's left or right swipe on the touch screen of the device.
The OS must save a state of the screen and IDs or something relative to the objects placed on the screen to retrieve the state each time the screen becomes visible.
From my research I understand that Android OS treats all the 7-8 homescreens on devices as one single host.
Also my question might seem vague, but the reason why I am asking is because it seems reasonable that app widgets on android devices, update not only when the phone is awake but also only when the app widget itself is visible. I know that Google has declined the enhancement request by many others but I don't think that is good enough. Link here.
That is the reason why I am trying to give it a shot to understand and implement it for my app with whatever Android knows about the state of the home screens.
Any help or insight is much appreciated. Also the experts out there let me know if you think this can be even implemented for one off apps at all?
Well, as the link you posted clearly states, there's no way to know.
Also, if you consider the fact that "Home" is just an application like all the others, it makes even less sense to have a unified API for that. A lot of people use Launcher Pro or similar applications, which would probably not implement it.

Categories