Changing UI in Java Android - java

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.

Related

Android app appearing different on real device vs emulator

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.

Android / Java: Show GUI on "off-screen" (Always-On Display...)

I saw new Android devices coming out, that show things (clock etc.) once the display "turns off". That feature is called an Always-On Display, and since my Samsung Galaxy S6 edge already features an AMOLED screen, and a night-clock, I believe there is a way, to make it show something, when the display is "turned off". Is there a way using Java on Android, to display something, once display is meant to turn off? (Like just a normal GUI, I could do the rest then.)
Like, to tell your app, to show something, when the screen turns off, that is still visible somehow? (without root permissions)
That would be useful, thanks in advance.
UPDATE:
I found some apps on the Google Play Store, which seem do to, what I want (not that specialized though):
https://play.google.com/store/apps/details?id=com.thsoft.glance&hl=de
https://play.google.com/store/apps/details?id=com.orthur.always_on_display&hl=de
So it is definetely possible, I just need to know, how.
If you are not using root, then you can only use the Android APIs. Here is a list for example for the display: http://developer.android.com/reference/android/view/Display.html
I don't see anything there for the Ambient Display mode or Always-On.
Samsung provides APIs also for the features of it's phones here: http://developer.samsung.com/galaxy Here I can find the Look API that has something close to what you want, but for Edge.

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.

Designing xml layouts for different screen: Android

I am working on a small app, with 3 buttons on left corner(Vertically) and a edit box which covers rest of the screen.
I want to run this app to be able to work on all screen resolutions.
So I have used Relative layout, linear layout and Android:weight for buttons, which equally share the size of the buttons and works fine.
My Question is am I doing it wrong?
Should we design different layouts for different screens or using same layout out but adding properties like weight and padding is fine??
So, you want a responsive layout for your android app.
Pointing to your question :
[+1] layout -> Relative / Linear (in addition to the relative layout)
property (Buttons) -> Android:weight
is the right thing you are doing for your app.
Alternative:
But if you want a more responsive design then you could follow responsive design techniques by using html5 & css3 media queries etc. . And, could opt for a fluid layout also. By doing this the advantages you will have are:
Won't have a native UI only for android but the same could be used for other platforms (iOS,blackberry etc.) if you require.
The design would be more seamless with the native browser and the widgets won't get obsolete ever in the newer versions of your android
platform also and changes once done would be reflected over the other
platforms too.
More info: MUST READ IF YOU WANT CLEAR UNDERSTANDING OF HOW TO DESIGN FOR ANDROID
http://developer.android.com/design/style/devices-displays.html
http://developer.android.com/design/style/metrics-grids.html#48dp-rhythm
you can see this Supporting Multiple Screens and also Designing for Multiple Screens
To support different screen size you have to implement different layout.
Under res directory you should create these directory:
layout
layout-small
layout-large
layout-xlarge
In each directory you implement your layout. be aware to call all the layouts with the same name.
If you want to support the landscape mode too you have to add:
layout-small-land
layout-large-land
layout-land
When, in Eclipse, you open the layout select the tab called 'Graphical Layout' , you will see how your layout will be displayed. Change the screen size using the options in the upper left side and you can check how it will be displayed in different screen size.
If something is wrong you can open the xml using and correct it.
I've created a small tutorial here Multiple screen support
Hope this help you

App not working on certain phones

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

Categories