[Q] OpenGL fit in 480x854 texture are very strange ? - Android Q&A, Help & Troubleshooting

I am developing my game from SurfaceView and work fine before, and keep work on move to OpenGL(it's speed for doing some effect and easy then SurfaceView), but meet some trouble on 480x854 device, check out my example image below :
Image resource use (36x35) and put on asset folder:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Crop by 34x1 is not correct (draw from top to bottom):
I want this result :
My onSurfaceChanged code :
gl.glViewport(0, 0, w, h);
gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glLoadIdentity();
w=320;
h=480;
GLU.gluOrtho2D(gl, 0, w, h, 0);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadIdentity();
Click to expand...
Click to collapse
Does anyone meet the strange issue ? or I just use default OnSurfaceChanged setting(320x569) screen to 480x800 ?
Original problem also post at :
http://stackoverflow.com/questions/...on-480x854-device-crop-image-having-1-px-diff

Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

Anybody know the issue? or just occur on motorola device ?

I have been resolve the problem, but restrict in Landscape mode.

Related

[Q] Theming Help - Tabs, and more

Hey guys so I m pretty much flat out new to theming and Android in general but I've gotten by so far with google and sites such as this, and androidforums. Except I keep running into problems and I figured posting my self would probably be best. My plan is to update this post with new questions I have and also keeping updated with the correct answer if provided for easy reference for future use.
So without further ado my first problem lies currently in twframework-res.apk.
Currently I am trying to edit the tw_tab_selected.9.png. I have an odd problem in that when I edit it and add in the proper guidelines in draw9- which was none (*Note the original tw_tab_selected.9.png actually does not have any guidelines even though it is a .9png) it seems to stretch out like below:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The image SHOULD stretch out and appear like the following image:
Couple of notes:
- I have tried adding guidelines to my modified tw_tab_selected.9.png, below is an example of one of the guideline formats I tried but still yielded similar results as above picture #1 (This was following the draw9 guidelines of a similar image tw_tab_selected_ss.9.png)

[Q] Show CPU Usage

I'm curious, the "Show CPU Usage" in Android 4 Dev Tools has three numbers at the top. Can anyone tell me which each one means?
Thanks.
Do you have a screen capture?
Wouldn't it be the loadavg?
I am wondering the same thing. Here's the screenshot from ICS:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Found the answer: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
Does anybody know, what the colors of this CPU usage means? When I start few apps, blue bar appear and device freze until blue bar disapear.
Shouldn't be I/Os? Like slow flash memory in my tablet? (ainol novo7 elf)
I never saw this on SGS2...
Same question here! What exactly does the colours mean??!
I was looking this up a few months ago and came across this thread. I just realized that the colours are based off of htop: serverfault.com/questions/180711/what-exactly-do-the-colors-in-htop-status-bars-mean (which makes sense).
Blue = Low priority threads
Green = Normal priority threads
Red = Kernel threads
Click to expand...
Click to collapse
Hope this helps other curious people!
ps: sorry about the lack of hyperlink. This is my first post

[Q] Change usability of screen size on android

Would it be possible to edit android source code lets say for the Galaxy S to only use a certain portion of the lcd screen. Say much like changing the resolution but creating it so only say 1 inch down would be usable. The rest inoperative.
Just curious if this is a hardware or software thing.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As far as i know i don't know if this can be done but you can still try reducing lcd density.
Why do you want to do this ??
Note that changing or altering LCD density can give FCs on various apps.
karimkahale said:
As far as i know i don't know if this can be done but you can still try reducing lcd density.
Why do you want to do this ??
Click to expand...
Click to collapse
I want to put this inside a calculator.
Just to mess around it seems like a fun idea, but im wondering if it can be done and what i need to edit in the code.
any tips on this?im very interested in this in order to make a screen of a 7'' tablet to fit an acessorie from my car

CM9/ICS Semi-transparenet/Transparent Status bar

Ok, so every mod/guide/apk I have found for CM9/ICS does not seem to work with any of our ICS Roms. From reading comments, it seems that somewhere mid 2012 something changed in the SystemUI source that stopped the previous mods from working. I am guessing that is our problem.
Well there is a source patch that does work for ASOP by Evilisto.
I used that diff patch as a somewhat 'guide' for editing the systemUI.apk of CM9 and it works!! Just thought I would share.
Just a couple of notes...
1. There is no 'res/layout-sw600dp/navigation_bar.xml'
2. No need to edit the launcher portion
3. The changes to 'res/values/colors.xml' actually need to be made to our 'res/values/drawables.xml'
4. When editing 'com/android/systemui/statusbar/phone/PhoneStatusBar.smali'
- Do a search for 'mPixelFormat' and directly above that line change 'const/4 v8, -0x1' to 'const/4 v8, -0x3'
- That is equivalent to making the 'mPixelFormat = PixelFormat.TRANSLUCENT;' change.
- Thats the only edit you need to make to that file
5. No need to edit 'com/android/systemui/statusbar/tablet/TabletStatusBar.java', our phones not a tablet
Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

[APP][Android Studio] How to make buttons that are rounded on only one side?

Hi XDA community
Currently I'm trying to implement a simple add-subtract button pair into my app, but for it to look how I want it to, I need to round only the left edges for the left button and only the right edges for the right button.
Also, once a certain limit is reached (f.e. you can keep adding 1 until you reach 10 / you can keep subtracting 1 until you reach 0), the corresponding button should gray out.
Here's a sketch of how I want it to look like:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I can handle the logic for the adding, subtracting and graying out, but for the selective edge-rounding I've found nothing so far.
Can you help me?
So I just asked a classmate and the answer is pretty elegant.
You first need to create a new layout resource file with a <shape> element as the base.
Then, you use "android:topLeftRadius" and the like to make a shape and pass it to the button like this: 'android:background="@drawable/rounded_button_left"' with "rounded_button_left" being the filename of my layout resource file.
Hope I could help someone

Categories

Resources