yashsingh1/xdaforums huggingface dataset:
[Android Software Development] mattmanwrx:
Hmmm, strange... I'm all out of ideas then....

Edit: what's it like on landscape?

EDIT2: It is that android:scaleType - if you look here - http://developer.android.com/reference/android/widget/ImageView.ScaleType.html

ImageView.ScaleType CENTER Center the image in the view, but perform no scaling.

So going by that page, you'll need to *probably* do

ImageView.ScaleType CENTER_CROP Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).

or play around with those values and see what happens!!
[Android Software Development] maxxie85:
the buttons do not change in to a dot when watching video on gallery or youtube they just dissapere in the style the notification bar dissaperes, by floating out of the screen.
[Android Software Development] mattmanwrx:
See my edit2 above...

Ok, try using an app, or playing a full screen game app... I know that Ski Safari (I love this game) uses the lights out "dot"... I'm about to leave work so cannot check any others... or maybe download something like BS video player which does use the lights out "dot" too...
[Android Software Development] plegdroid:
afternoon, you didnt state if this is htc jb, or cm10. if it's cm10 where the back button isn't scaling correctly, it's an issue upstream, if it's not cm10 iam way off :)

a fix has been submitted.

http://r.cyanogenmod.com/#/c/20858/1

sent from my lump of plastic
[Android Software Development] mattmanwrx:
Thanks, as I expected... It is for jb, not.cm10 though... It is evervolvs source, which is based on aosp, so I guess it is aosp source that has it (as android developers thought no one would change the dimension)...

I guess need to change it to *i think* the center_crop so it scales.down.too.. it is all in the above link I posted...
[Android Software Development] plegdroid:
does suggest this, this is from a repo of the latest cm10 :)

sent from my lump of plastic
[Android Software Development] maxxie85:
Thanks

it is indeed for evervolv source. So no CM10. But it is possible that the same fix will work.

I won't be able to try it out anymore because I am going on holliday tomorrow for 12 days Ibiza.

When I get back I will take a look.
[Android Software Development] mattmanwrx:
As I have the source to play with I can make the change and test it for you... I will build it all from.source (even though it takes around 6hours on my machine!! :eek:) if you want, you can ask nikez make the commit direct to evervolvs source... :)

Have a nice holiday.. :)
[Android Software Development] Bojan155:
centerCrop didnt work, just take it out completely and it will work fine. :good:
[Android Software Development] phantom78:
I've modded framework-res.apk but nav buttons didn't show :(

https://dl.dropbox.com/s/9ldctpkgxnwf7at/framework-res.apk?dl=1
[Android Software Development] mattmanwrx:
On xperia Sony firmware...? Could be why...
[Android Software Development] dude1986:
Hi Guy`s....

can somebody tell me where i can enable the "checkbox" for the nav_bar?
[Android Software Development] phantom78:
yes. Sony Arc 4.1.B.0.587
[Android Software Development] mattmanwrx:
You must follow the steps on the OP.... There isn;t a "checkbox", it is a boolean within resources.arsc

---------- Post added at 03:48 PM ---------- Previous post was at 03:47 PM ----------

Then there is probally a piece of sony firmware stopping them from viewing... Has Sony actually released a device which uses the nav_bar?
[Android Software Development] phantom78:
No :( Old FW can uses the nav_bar. This is new FW released ~4 days ago
[Android Software Development] mattmanwrx:
Well there must be something stopping it/looking elsewhere... Sorry I can't help further, I've only done this for vanilla android based roms..
[Android Software Development] daniETingles:
anyone have any clue as to why my on-screen buttons are really laggy/glitchy? i used multi-apk tool, deleted resources.arsc or w/e its called, everything booted up fine, but the keys are extremely laggy and buggy :(
[Android Software Development] mattmanwrx:
Never heard of that before... Can you make a video to show?
[Android Software Development] daniETingles:
Yeah I find it weird because I've been searching through the whole thread and not a single person says it... well its just laggy, sometimes when I unlock my screen only one key shows up, the blue press animation is super choppy, the keys themselves look glitchy too!

Sent from my Paranoid V1.5A Android using the XDA App.
[Android Software Development] maxxie85:
Thats strange, I also used multi-apk tool and everything whas fine. However because I was busy for a jellybean rom I uses a different apktool.jar and a pathed aapt which was posted in this thread some time ago.
[Android Software Development] Riyal:
Hello guys! I once used this tutorial on enabling navigation buttons on my Xperia Phone. Now I have an HTC phone and I can't get it to work with sense 4.0.

I did a search on this thread and I saw some posts asking for com.htc.resources.apk for sense. Problem is there's no direct tutorial for sense so I'm lost :(

Anybody here knows/could pinpoint me to a tutorial or at least know how to do it?
[Android Software Development] mattmanwrx:
I'm guessing you'll need to decompile com.htc.resources.apk and play around in there... On my One X, the statement is set to true, but it doesn't show any buttons, however, it does show the "Three dot menu bar", so it is being pulled from somewhere... I guess com.htc.resources.apk...
[Android Software Development] plegdroid:
you'll need to pull the resources apk, and framework res apk, from your phone.

you've got to install both apk in apktool with the cmd

apktool if com.htc.resources.apk

&

apktool if framework-res.apk

then decompile with

apktool d framework-res.apk

make your edit

and recompile with

apktool b framework-res.apk

if that helps. nothing's ever easy with HTC :D

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] Riyal:
already did that nothing happened that's why I asked :good:

Hi! I'm not sure what to look in com.htc.resources.apk but I noticed this on SystemUI.apk

<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@id/nav_buttons" android:orientation="horizontal" android:clipChildren="false" android:clipToPadding="false" android:animateLayoutChanges="true">
<View android:layout_width="0.0dip" android:layout_height="fill_parent" android:visibility="invisible" android:layout_weight="0.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_width="0.0dip" android:layout_height="fill_parent" android:id="@id/back" android:layout_weight="0.0" android:src="@drawable/ic_sysbar_back" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:layout_width="0.0dip" android:layout_height="fill_parent" android:visibility="invisible" android:layout_weight="0.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:background="@drawable/navigation_bar_item_bg" android:layout_width="80.0dip" android:layout_height="fill_parent" android:id="@id/menu" android:layout_weight="1.0" android:src="@drawable/icon_btn_menu_dark" android:contentDescription="@string/accessibility_menu" android:scaleType="center" systemui:keyCode="82" />
<View android:layout_width="0.0dip" android:layout_height="fill_parent" android:visibility="invisible" android:layout_weight="0.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_width="0.0dip" android:layout_height="fill_parent" android:id="@id/recent_apps" android:layout_weight="0.0" android:src="@drawable/ic_sysbar_recent" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_width="0.0dip" android:layout_height="fill_parent" android:id="@id/home" android:visibility="invisible" android:layout_weight="0.0" android:src="@drawable/ic_sysbar_home" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:glowBackground="@drawable/ic_sysbar_highlight" systemui:keyRepeat="false" />
</LinearLayout>

do you think the android:layout_width="0.0dip" could have cause this?

Don't have access to my personal PC yet so can't try.
[Android Software Development] mattmanwrx:
Hmmm...

I've not nitced that before... but yes, that would make it not show up!!

also, I've noticed the "@null" (highlighted in red) tag quite a lot!

<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="0.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="0.0dip" android:layout_height="fill_parent" [COLOR="Red"]android:src="@null"[/COLOR] android:layout_weight="0.0" [COLOR="Red"]android:contentDescription="@null"[/COLOR] systemui:keyCode="4" [COLOR="Red"]systemui:glowBackground="@null"[/COLOR] />
<View android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="0.0" />
[COLOR="Blue"]<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:background="@drawable/navigation_bar_item_bg" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/icon_btn_menu_dark" android:scaleType="center" android:layout_weight="1.0" android:contentDescription="@null" systemui:keyCode="82" />[/COLOR]
<View android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="0.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="0.0dip" android:layout_height="fill_parent" [COLOR="Red"]android:src="@null"[/COLOR] android:layout_weight="0.0" [COLOR="Red"]android:contentDescription="@null" systemui:glowBackground="@null" />[/COLOR]
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" [COLOR="Red"]android:src="@null"[/COLOR] android:layout_weight="0.0" [COLOR="Red"]android:contentDescription="@null[/COLOR]" systemui:keyCode="3" systemui:keyRepeat="false" [COLOR="Red"]systemui:glowBackground="@null"[/COLOR] />
</LinearLayout>

They shouldn't be "@null" - I guess this means they aren't pulling anything...

What might be easier is if you just swap it out for a standard android one and see what happens... :)

EDIT: So I've just reliased that the menu button (highlighted in blue) is being pulled from here, so it is the correct place to be looking... Just swap it with vanilla android one and see if it works... :)
[Android Software Development] Riyal:
Thanks! I'll try to alter this xml first before trying to replace it with a vanilla android one. Although I doubt it would work since sense is quite too picky with replacing it's system apps.

Anyways I don't have those @nulls on my systemUI. Just a FYI. :)
[Android Software Development] mattmanwrx:
oh yea, so you dont! yes, alter thouse first, see if it makes them display (I guess it should), I think the swap should work too!!
[Android Software Development] Riyal:
Ok a little update. Tried editing the values & replacing the navigation_bar.xml with the one from sony. Still nothing :( the black space which should occupy the screen on the botton doesn't even show up. Anybody here knows what to look for on com.htc.resources.apk for the navigation_bars? I think that's my last and only hope lol :D
[Android Software Development] mattmanwrx:
The bool is set to true is it? As in the first post of this thread?

I just tried decompiling com.htc.resources.apk - couldn't... I dont usually play around with HTC files, is there a special way of decompiling it?
[Android Software Development] Riyal:
Yes boolean value is set to true.

Regarding decompiling com.htc.resources.apk you need to add the dependencies.

you can add it by typing the command

apktool if <framework/resource files>

Ex.

apktool if framework-res.apk

apktool if SystemUI.apk

apktool if com.htc.resources.apk

and so on...

Just make sure the files you're installing comes from the same ROM your com.htc.resources.apk came from. :good:

if done correctly when decompiling com.htc.resources.apk should output the ff.

C:\Users\Don2x\Desktop\apktool>apktool.bat d com.htc.resources.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Don2x\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...

C:\Users\Don2x\Desktop\apktool>

as far as I know 1.apk should be framework-res.apk :)
[Android Software Development] Riyal:
you must be using an non compatible apktool try using mine.
[Android Software Development] mattmanwrx:
Same... My apks are from Sense 4.1 BTW - I think it is becasue I'm using a modded one already maybe..

I will have to try on my laptop at home, as my work computer is more for Vanilla android with all the frameworks I've got installed!
[Android Software Development] cmason37:
deleted
[Android Software Development] beekiller1:
Does anyone know if there's a flashable zip for the navbar running jb?
[Android Software Development] mattmanwrx:
Its the same method, so you can do it the same way...

There won't be "a flashable zip" that is for all roms, it plays around with framework files that are different on every device!

I think I have seen CM discussing putting it into system to "enable" it by checkbox or something...
[Android Software Development] iwillgo:
I follow your steps in post#1 and can successfully add the on-screen buttons. However I have some issues:

1. keyboard's key become very small on both portrait & landscape mode (I later found out it only affects the chinese keyboard (build-in in stock rom), when I switch to the xperia keyboard (also in stock rom) it can display as normal.

2. the navigation bar covers part of the icons on both portrait & landscape mode (but it seems normal in the apps list screen.)

3. I still think the navigation bar is too thick. How can I make it thinner?

I attached some screenshots fyi. Could you or anyone else can help to fix these? Thanks in advance.

P.S.: My device is Xperia Neo with stock ICS 4.1.B.0.431
[Android Software Development] mattmanwrx:
Hi, it seems that becuase the device is not supposed to support on screen buttons, it doesn't allow for them to be shown properly... Unfortuantly, I see no fix for this.

Is there any Xperia device that has the soft keys enabled by default? If there is, then maybe look at that rom/frameworks to see if there is anything that jumps out at you...
[Android Software Development] iwillgo:
I don't know if there is any other Xperia device has the soft keys enabled by default... :(

After another try, I found out how to make the bar thinner. Just simply change these two values in the "dimens.xml" file:

<dimen name="navigation_bar_height">48.0dip</dimen> 48 change to 26 (affects the portrait mode)

<dimen name="navigation_bar_width">42.0dip</dimen> 42 change to 26 (affects the landscape mode)

After decreasing the values above, the navi bar will still cover the letters below the icon, but it is much better that it didn't cover the icon. And I also found that changing the image files in SystemUI.apk has no effect on me (it would't resize the navigation bar nor fix the cover icon issue). So I have changed back to the original image files and it display fine on my Neo.

Still very sad about the chinese keyboard issue. Hope someone can figure out how to fix it.
[Android Software Development] mattmanwrx:
Yea, I've been in this thread for a long time - http://xdaforums.com/showthread.php?t=1364757&page=11 - and set the nav bar height to half the original size (24 and 21) for my HTC desire...

By the look of the screen shots, it didn't look like it was going to "fix" the "issue"... but glad it is fixed...
[Android Software Development] iwillgo:
It's 58 pages in this thread...sorry haven't read all of them...

I can't find yr screenshots, could u upload again? Thanks.
[Android Software Development] mattmanwrx:
well, you should ;) only joking!! :)

I think I must have deleted my screenshots, and would no longer have them as I dont use the device any more!

it just showed the bottom of the stock keyboard being cut off, I made the dimens smaller and it was ok after that!! :)
[Android Software Development] Hotfingers:
CM10 puzzler

Hello,

I've tried to enable on-screen buttons on my XPERIA ARC (running CM10).

(I used the latest APK-Multi-Tool tp decompile / compile framework-res.apk.)

The buttons work fine, but my strings seem a little confused...

Here are some examples of the strings displaying incorrectly: -

"charged" is displayed when the phone is "charging".

"please plug in your charger" is displayed when the phone is "charged".

"30 weeks" is shown for the screen timeout instead of "30 secs"

"2 secs" screen timeout is shown instead of "2 mins".

Also, some buttons show garbled labels instead of "OK", or "Apply".

The phone works 100% fine. The screen time-outs work correctly, and the charging process works correctly.

It's just the messages that are off.

So some-how the wrong strings are being used to display error messages.

Has anyone seen this before, or does anyone have an idea what could be happening here?

Thanks for any help
[Android Software Development] mattmanwrx:
I have not seen that before... very strange issue....

Maybe compile it again, and see if that helps? Otherwise, I haven't a clue on what has gone on there.
[Android Software Development] aztex00:
I have been able to follow your instructions up till the last step. How did you get Droid Explorer to detect the phone? I have enabled USB debugging, but I see no USB icon in my ICS status bar, and Droid Explorer (running as admin) does not see it.

I did not have the Android SDK installed, but I did click on the "setup Android SDK for me" when installing Droid Explorer.

Edit: I am running:

Droid Incredible

Evervolv Preview5 ICS

Running "adb devices" lists no attached devices. I've tried rebooting the phone as well as the computer. Still no USB icon when I plug in the USB. Is this just an issue with this particular rom?
[Android Software Development] evilisto:
sorry... maybe due to my poor english, i can't understand well what you saying..

1) all i added in first post yesterday is about buttons resize.

2) i think almost all of wvga(hdpi) devices' default lcd density is 240.. maybe droid incredible is too. if not, that must be rom dev's intension..

and even if you don't resize buttons, you don't have to change lcd density lower than 230.

240(default) : keyboard overlapping problem

230 : no problem (except app compatibility issues)

220 : widgets overlapping with search bar

210 : no problem but all things are too small..

3) the default value of "navigation_bar_height" is 48.0dip and i changed to 37.0dip. this is about right for wvga(hdpi) devices.

4) if you resize buttons, you don't have to change lcd density anymore. no more keyboard overlapping or other problems with default lcd density(240).

5) generally, you don't have to edit "navigation_bar_width".
[Android Software Development] sixfearstheseven:
What I was asking was how you changed the bar height, but I found it in dimens.XML shortly after asking.

Thanks for pointing this out. In all the updated ICS ROMs, I've been having issues with app compatibility. The Market won't let me download most apps, including apps like Facebook and Twitter, and even Google+. I haven't been able to figure out why, but I suspect it's a result of editing build.prop EDIT - I missed the part of your post confirming my suspicions about build.prop.

Boot into recovery and mount /system then plug the phone into computer. Also, make sure you have HTC Sync installed so you have the necessary USB drivers (install that first, then do the recovery thing)

Before you go forward, decompile framework-Res and go to the values folder and open dimens.XML and find "navigation_bar_height" like the post above yours describes and change it to 37.

Reopen build.prop and change the dpi back to 240. As I mention below, I suspect changing build prop is breaking app compatibility in Evervolv and ics-deck
[Android Software Development] sixfearstheseven:
Double post
[Android Software Development] aztex00:
Thanks for the help, sixfearstheseven!

I ended up just replacing the framework-res file on the ROM and reflashed. On screen buttons FTW!

Now onto tweaking the app/keyboard overlap tonight.
[Android Software Development] thisisepic0727:
After recompiling framework-res, I am left with an unsigned-framework-res, is this the file I need to move to /system/framework?

If using Droid Explorer, what steps do I need to do to move the apk, is it a simple copy and paste or are there other steps?

Thanks in advance.
[Android Software Development] sixfearstheseven:
System files don't need to be signed. Place the unsigned framework on your desktop. Rename it framework-res.apk then open Droid explorer with your phone in recovery and system mounted. Navigate to system/framework/ and find the original framework (called Android System in Droid Explorer) and delete it. Right click the new framework on your desktop, click copy, go back to Droid Explorer and paste it where the old one was. Reboot your phone and you're done

Didnyou modify build.prop? Or did you change the navigation bar height in dimens.xml? You have to do one or the other, otherwise the navigation bar overlaps the keyboard. I suggest changing dimens.xml because altering build.prop can break compatibility with apps in the Market. dimens.xml is in the values folder, the same folder arrays and bools is in. Change the "nav_bar_height" from 48 to 37

Awesome, glad I could help, but if evilisto hadn't posted this, a lot of us may not have been able to do it, so thanks to him too.

I asked around for weeks in ICS ROM threads if anyone knew how to do this or if any dev wanted to release a version of their ROM with the buttons enabled but no one ever replied, so I'm glad we have this thread
[Android Software Development] sixfearstheseven:
Dammit, double post again