Im trying to create a simple app,which loads an image and displays it in an imageview and there is a scroll bar and button below.But after loading large images the image covers up the scroll bar and the button.Tried using different settings with each view's layout but nothing worked.What i want is the image should be displayed in the imageview placed at a fixed location the position of imageview should not be changed neither its size,im quite new to android development im looking for a property like strech in c# which stretches or reduces the size of the images so that it fits in the imageview
Can some one help me,posting the code from main.xml below
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="link"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center">
<ImageView
android:id="@+id/imageView1"
android:layout_width="302dp"
android:layout_height="355dp"
android:src="@drawable/jellyfish" />
<SeekBar
android:id="@+id/seekBar1"
android:layout_width="262dp"
android:layout_height="wrap_content" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
android:onClick="clickme"
/>
</LinearLayout>
ImageView has android:scaleType="some_scale_type" property, that does exactly what you require. You can stretch, keep original size or fill available area. There's a problem with you layout, though. Why do you use these absolute values? You know they will look ugly on devices with different DPI/screen sizes, not to mention orientation change?
Good afternoon ladies and gents.
I have been scouring the internets for a solution for this problem to no avail. I have been able to theme my Google Play Edition GS4 running stock 4.3 almost to perfection to look like KitKat. The only part that is killing me is the Navigation bar transparency. I can get it transparent with Gravity Box, but it is half transparent, half black. The half black bar, as you can see, really ruins the entire look of the home screen.
From what I can deduce, it is a launcher issue because when I scroll over to Google Now, it is full screen all the way down to the bottom of the nav bar. I have tried, with my limited knowledge of coding, to decompile the Google Home Launcher apk, but it looks like it is just an overlay for the main Android launcher; Launcher2.apk. I also decompiled that apk, but as I said, I have VERY limited knowledge of what I am even looking at. I made some blind modifications to a few thing I thought might fix the issue, but they didn't work.
This is slowly killing me. If there are any experienced modders that can help me out, I would really appreciate it. I know there are many other folks looking for a fix for this as well.
:good:THANKS!! :good:
P.S. I forgot to mention that it is not a wallpaper size issue either. I have tried many wallpaper setting apps that fit the wallpaper to the screen size with the same results.
comoc85 said:
Good afternoon ladies and gents.
I have been scouring the internets for a solution for this problem to no avail. I have been able to theme my Google Play Edition GS4 running stock 4.3 almost to perfection to look like KitKat. The only part that is killing me is the Navigation bar transparency. I can get it transparent with Gravity Box, but it is half transparent, half black. The half black bar, as you can see, really ruins the entire look of the home screen.
From what I can deduce, it is a launcher issue because when I scroll over to Google Now, it is full screen all the way down to the bottom of the nav bar. I have tried, with my limited knowledge of coding, to decompile the Google Home Launcher apk, but it looks like it is just an overlay for the main Android launcher; Launcher2.apk. I also decompiled that apk, but as I said, I have VERY limited knowledge of what I am even looking at. I made some blind modifications to a few thing I thought might fix the issue, but they didn't work.
This is slowly killing me. If there are any experienced modders that can help me out, I would really appreciate it. I know there are many other folks looking for a fix for this as well.
:good:THANKS!! :good:
P.S. I forgot to mention that it is not a wallpaper size issue either. I have tried many wallpaper setting apps that fit the wallpaper to the screen size with the same results.
Click to expand...
Click to collapse
try Nova Launcher it offers fully transparent bar...
ongbac said:
try Nova Launcher it offers fully transparent bar...
Click to expand...
Click to collapse
Nova doesn't have the same features that the Google Home launcher has like hot word detection from home screen or swipe right to show Google Now.
I have found the code in my SystemUI.apk that I think will change the layout of the nav bar, but as I am new to xml coding, I'm not 100% sure what I'm looking at. Any help?
Code:
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="40.0dip" android:src="@drawable/ic_sysbar_menu_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_recent_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_home_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_back_land" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="40.0dip" android:layout_weight="0.0" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:layout_marginTop="40.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:layout_marginBottom="40.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
</LinearLayout>
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="center_vertical" android:id="@id/search_light" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/search_light" android:scaleType="center" />
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="vertical" />
</FrameLayout>
<View android:id="@id/rot270" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.NavigationBarView>
transparent status bar not working using gravity box( xposed framework)
comoc85 said:
Nova doesn't have the same features that the Google Home launcher has like hot word detection from home screen or swipe right to show Google Now.
I have found the code in my SystemUI.apk that I think will change the layout of the nav bar, but as I am new to xml coding, I'm not 100% sure what I'm looking at. Any help?
Code:
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="40.0dip" android:src="@drawable/ic_sysbar_menu_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_recent_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_home_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_back_land" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="40.0dip" android:layout_weight="0.0" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:layout_marginTop="40.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:layout_marginBottom="40.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
</LinearLayout>
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="center_vertical" android:id="@id/search_light" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/search_light" android:scaleType="center" />
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="vertical" />
</FrameLayout>
<View android:id="@id/rot270" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.NavigationBarView>
Click to expand...
Click to collapse
i m running cyanogen mod 10.2(4.3.1) samsung galaxy s3 i9300 and i m getting the transparent status on the locksreen but not on the homescreen, i m using gravity box and xposed installer
and i too really like the hotword feature of google on the homescreen , could you tell me how i could get it on my phone
can anybody help me to give instruction how to change text color and clock color on hyperion 9 lockscreen?
no respond
decompile framework-res.apk
look at keyguard_screen_lock.xml in layout
Code:
<TextView android:textSize="34.0sp" android:gravity="center" android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="18.0sp" android:gravity="center" android:id="@id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" />
you can try adding color
Code:
android:textColor="#ffffffff"
to it (in this case the hex value is white)
so it looks like
Code:
<TextView android:textSize="34.0sp" android:gravity="center" android:textColor="#ffffffff" android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="18.0sp" android:gravity="center" android:textColor="#ffffffff" android:id="@id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" />
see what happens
you will have to work out xmls yourself - do some searching - its the best and fastest way to solve something because you will be waiting days and days for an answer like this that google could tell you in a few secs
marcussmith2626 said:
decompile framework-res.apk
look at keyguard_screen_lock.xml in layout
Code:
<TextView android:textSize="34.0sp" android:gravity="center" android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="18.0sp" android:gravity="center" android:id="@id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" />
you can try adding color
Code:
android:textColor="#ffffffff"
to it (in this case the hex value is white)
so it looks like
Code:
<TextView android:textSize="34.0sp" android:gravity="center" android:textColor="#ffffffff" android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="18.0sp" android:gravity="center" android:textColor="#ffffffff" android:id="@id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" />
see what happens
you will have to work out xmls yourself - do some searching - its the best and fastest way to solve something because you will be waiting days and days for an answer like this that google could tell you in a few secs
Click to expand...
Click to collapse
thank you for your respond
i have tried it and nothing happen to my lockscreen, the color does not change
that's why i ask how to change the color to this forum, i have tried any ways to change the color and nothing happen to my lockscreen
darkterro said:
thank you for your respond
i have tried it and nothing happen to my lockscreen, the color does not change
that's why i ask how to change the color to this forum, i have tried any ways to change the color and nothing happen to my lockscreen
Click to expand...
Click to collapse
look in styles.xml and try and find the style for the date and time ids and see if it has a color
Hey folks, this could be a problem with the way I'm handling layouts, or not. Sort of new to Java and Android SDK.
My goal at this point is to have an app going which has the screen showing a navigation bar at the bottom with an icon, and a toolbar at the top with an "OFF" button and a "Save" button. Between the toolbar and the navigation bar should be a blank, white screen.
But I'm having trouble getting the toolbar to just stay at the top of the screen. The grey background takes up the entire screen in front of what was the white background. A picture of the screenshot is attached.
And here's what I have:
Code:
<RelativeLayout xmlns:android="schemasdotandroiddotcom/apk/res/android"
xmlns:tools="schemasdotandroiddotcom/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ContactActivity">
<RelativeLayout
android:id="@+id/toolbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="@color/toolbar_background">
<ToggleButton
android:id="@+id/toggleButtonEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentleft="true"
android:layout_marginLeft="20dp"
android:text="@string/toggle_button" />
<Button
android:id="@+id/buttonSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:text="Save" />
<RelativeLayout
android:id="@+id/navbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@color/navbar_background"
android:gravity="center_horizontal">
<ImageButton
android:id="@+id/imageButtonList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:contentDescription="Contact List Button"
android:src="@drawable/contactlisticon" />
<ImageButton
android:id="@+id/imageButtonMap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRight0f="@id/imageButtonList"
android:contentDescription="Contact Map Button"
android:src="@drawable/mapicon" />
<ImageButton
android:id="@+id/imageButtonSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:contentDescription="Settings Button"
android:layout_toRight0f="@id/imageButtonMap"
android:src="drawable/settingsicon" />
</RelativeLayout>
Thanks for your help! Sorry if I gave any code that wasn't necessary.
I'd like to make a few small changes in the framework-res.apk. I thought this might be "easy", but so far it's not.
I decompiled the apk file using apktool and located the two files I wanted to alter in res/layout. I made the changes, then saved the two edited files.
Next I opened the original framework-res.apk archive with WinRAR and then dragged the edited xml files into the proper location ("store", not "normal" or "compress") and then closed the archive.
Finally, I used CWM to copy the new framework-res.apk back to the NST and rebooted.
Boot loop.
Is it not possible to deal with slightly edited xml files in this way?
nmyshkin said:
I'd like to make a few small changes in the framework-res.apk. I thought this might be "easy", but so far it's not.
I decompiled the apk file using apktool and located the two files I wanted to alter in res/layout. I made the changes, then saved the two edited files.
Next I opened the original framework-res.apk archive with WinRAR and then dragged the edited xml files into the proper location ("store", not "normal" or "compress") and then closed the archive.
Finally, I used CWM to copy the new framework-res.apk back to the NST and rebooted.
Boot loop.
It is not possible to deal with slightly edited xml files in this way?
Click to expand...
Click to collapse
I found a working method: https://forum.xda-developers.com/t/...rk-res-apk-with-apktool.1545361/post-23589640
But...I want to move the quicknav bar to the top of the screen. The changes I made in the xml files do that, but the status bar covers the top part of the quicknav bar. Ideally I'd like the quicknav bar to cover the status bar (maybe not allowed?), or at least position right beneath it.
The relevant xml code which seems to control the screen position of the quicknav bar looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/quickNavMainView" android:background="@drawable/checker" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<HorizontalScrollView android:layout_gravity="bottom|center" android:id="@id/quickNavHSView" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView android:id="@id/home" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_home_normal" />
<ImageView android:id="@id/library" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_library_normal" />
<ImageView android:id="@id/shop" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_shop_normal" />
<ImageView android:id="@id/search" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_search_normal" />
<ImageView android:id="@id/settings" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_settings_normal" />
</LinearLayout>
</HorizontalScrollView>
</FrameLayout>
I've changed "bottom" in lines 4 and 5 to "top". That gets the job done, but with the problem mentioned: the status bar covers the top portion of the quicknav bar.
Help?
Changing framework or services or whatever you don't need to go to recovery.
They are just part of Android and have no influence on the Linux.
Code:
# stop
<do stuff>
# start
How about a screen shot?
I don't even think that I've ever even seen the stock QuickNav.
I'm not sure if this frame is the full screen or what.
How about adding android:layout_marginTop="24dp"?
(That dimension was picked out of the air. YMMV)
Renate said:
How about a screen shot?
I don't even think that I've ever even seen the stock QuickNav.
I'm not sure if this frame is the full screen or what.
How about adding android:layout_marginTop="24dp"?
(That dimension was picked out of the air. YMMV)
Click to expand...
Click to collapse
Thanks for the response. I'll try the marginTop idea. I've been looking all over for something like that but just hadn't generated the proper search string I guess.
Getting screenshots was a lot harder than I anticipated. The quicknav bar seems to disable the side hardware buttons when it is displayed but I finally figured out a way to get reasonable shots. You can clearly see the issue with the status bar when the quicknav buttons are moved to the top.
nmyshkin said:
I finally figured out a way to get reasonable shots.
Click to expand...
Click to collapse
What's the matter? You don't like my AdbGrab.exe (in sig)?
Renate said:
I'm not sure if this frame is the full screen or what.
How about adding android:layout_marginTop="24dp"?
(That dimension was picked out of the air. YMMV)
Click to expand...
Click to collapse
You were close (and right, of course)!
The bar becomes a little scrunched for some reason (less white space above and below icons/text) but it just abuts the status bar with android:layout marginTop="18dp". I don't care much about the loss of the white space, so it's on with the rest of my project.
Thanks again for the help.
Hmm, something's screwy.
Maybe try this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/quickNavMainView" android:background="@drawable/checker" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="18dp">
<ImageView android:id="@id/home" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_home_normal" />
<ImageView android:id="@id/library" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_library_normal" />
<ImageView android:id="@id/shop" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_shop_normal" />
<ImageView android:id="@id/search" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_search_normal" />
<ImageView android:id="@id/settings" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_settings_normal" />
</LinearLayout>
</FrameLayout>
Renate said:
Hmm, something's screwy.
Maybe try this:
Code:
<?xml version="1.0" encoding="utf-8"?>
...etc.
Click to expand...
Click to collapse
It seems to make no discernible difference. I notice that the line:
Code:
<HorizontalScrollView android:layout_gravity="bottom|center" android:id="@id/quickNavHSView" android:layout_width="fill_parent" android:layout_height="wrap_content">
is missing from your version. That, too, seems to make no difference.
There is another xml file which seems to have something to do with the "appicons" (which are just png images stored in the apk, text included):
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/appIcon" android:layout_width="wrap_content" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:layout_gravity="top|left|center" android:id="@id/badgeImage" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
Not seeing anything there that jumps out at me. If the android:layout_marginTop="18dp" is changed to something like "100dp" the bar more or less collapses into a fat line, as well as moving further down the display window, so there is some interaction between the "simple" shifting of the vertical display of the bar and the vertical size of the bar itself.
Like I say, it's not a big deal for me. As long as content is not cut off, a slight flattening of quicknav bar is fine.
All the tiles are 120 x 112 so that the horizontal scroll is overblown. (5 x 120 = 600).
I was trying to get rid of that.
Use my only Linear Layout and change layout_height="112dp"
For testing purposes you can also add android:background="#cccccc".
That way if the LL expands but the buttons don't you can see the shading.
Renate said:
All the tiles are 120 x 112 so that the horizontal scroll is overblown. (5 x 120 = 600).
I was trying to get rid of that.
Use my only Linear Layout and change layout_height="112dp"
For testing purposes you can also add android:background="#cccccc".
That way if the LL expands but the buttons don't you can see the shading.
Click to expand...
Click to collapse
Does the android:background="#cccccc" go in the LinearLayout section or in the overall FrameLayout? Right now it's kinda moot because I can't seem to produce an apk file that does not cause a bootloop. I have a previous trial version with android:layout_ marginTop="20dp" which does NOT produce a bootloop. The file size is about 2874 Kb. Every new version I try to build with Apktool today is coming out around 3366 Kb and they all cause a bootloop. I have no idea what is going on with Apktool, but I'll keep plugging away, with breaks for mental health!
nmyshkin said:
Does the android:background="#cccccc" go in the LinearLayout section...
Click to expand...
Click to collapse
In the LL.
When you're floundering in layouts, it's helpful to set some color background for each containing element.
Obviously, on a B&W device you'll not see that, but a screen grab will show it.
(You can just stick to background colors that are differentiable in B&W,)
The FrameLayout is the whole screen which dims the normal screen.
The LinearLayout should be 600 x 120 automatically.
You can even do a reality check by saying (in LL) android:layout_height="500dp".
Renate said:
When you're floundering in layout...
Click to expand...
Click to collapse
I think "floundering" is the operative word here!
Try as I might, I have been unable to produce a framework-res.apk that did not cause a boot loop IF I left out the
Code:
<HorizontalScrollView android:layout_gravity="bottom|center" android:id="@id/quickNavHSView" android:layout_width="fill_parent" android:layout_height="wrap_content">
This is what I have right now:
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/quickNavMainView" android:background="@drawable/checker" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<HorizontalScrollView android:layout_gravity="top|center" android:id="@id/quickNavHSView" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:layout_gravity="top|center" android:layout_width="wrap_content" android:layout_height="112dp" android:layout_marginTop="18dp" android:background="#cccccc">
<ImageView android:id="@id/home" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_home_normal" />
<ImageView android:id="@id/library" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_library_normal" />
<ImageView android:id="@id/shop" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_shop_normal" />
<ImageView android:id="@id/search" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_search_normal" />
<ImageView android:id="@id/settings" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_settings_normal" />
</LinearLayout>
</HorizontalScrollView>
</FrameLayout>
I was surprised to find that changing android:layout_gravity="top|center" in the LinearLayout section did NOT move the bar to the top. It was only when I made the change in the HorizontalScrollView that the bar went to the top of the screen (or almost).
I don't see any shading and perhaps the boxes are now even a bit smaller than before (see screenshot below). Again, I could live with this so it's not a deal-breaker for my intended project. It is interesting (and maybe just a little hair-raising) how these things interact in ways that I would not expect.
When you have a "boot loop" (which is just really Android flailing while the Linux is fine) you should check the logcat, it will tell you where the problem is.
I don't know how I missed where that HorizontalScroll was being used.
Yeah, I do. I was accidentally looking for quickNavHsView and not quickNavHSView.
In services.jar, com/android/server/status/StatusBarService uses that.
It must be a HorizontalScroll. You need that.
The quick nav itself is com/android/server/status/BNGossamerQuickNavbar
The default for layouts is top anyway.
Make the LinearLayout big, android:layout_height="300dp".
You won't see any background of the LL until it's bigger than its contents.
Renate said:
Make the LinearLayout big, android:layout_height="300dp".
You won't see any background of the LL until it's bigger than its contents.
Click to expand...
Click to collapse
OK. I did that but I'm not sure exactly what it tells me except that the size of the layout is greater than the size of the actual navbar images? I see this sort of thing when I am designing a scene in Tasker and the background field is larger than the image itself. There I would know what to do. Here....
Also, how does this relate to the squished (cut off?) images in the navbar?
Edit: I take some of this back now that I have looked more closely at the screenshot. The navbar is not so squished, although still not full size. This would suggest that if I make android:layout_height even larger the navbar will return to normal size. And maybe it does not matter since the background is transparent if I don't specify a color?
So, Bob's your uncle.
For the LinearLayout
android:layout_height="152dp" android:layout_marginTop="40dp"
You don't need to add a background.
How are you getting those screenshots and why are they JPEGs?
You can use
Code:
# screenshot /sdcard/snap.png
I forget if AdbGrab works for that.
There is that whole screenshot/screencap/framebuffer thing.
(Also format 1 & formt 2)
Renate said:
So, Bob's your uncle.
For the LinearLayout
android:layout_height="152dp" android:layout_marginTop="40dp"
You don't need to add a background.
How are you getting those screenshots and why are they JPEGs?
You can use
Code:
# screenshot /sdcard/snap.png
I forget if AdbGrab works for that.
There is that whole screenshot/screencap/framebuffer thing.
(Also format 1 & formt 2)
Click to expand...
Click to collapse
Well, that's just nifty! Thanks for looking at this and helping out.
I'm getting the screenshots using my swiss army knife app QuickTiles which includes a screenshot option. This uses the Screenshot Easy app as a plugin. I selected jpeg as the format, could have been png. You may recall that the native screenshot capabilities of the NST leave something to be desired. Screenshots come out with a green cast (or is is blue?) because of some weird color coding which I can't remember now.
Anyway, I normally have Quick Tiles assigned to the "clock" region of the status bar, but I want the quicknav bar there, so I temporarily assigned Quick Tiles to the "n" button. As much as I love Quick Tiles and spent a lot of time figuring it all out, I will be the first to admit that it is sometimes maddeningly slow to open. Other times it is nearly immediate, just like any other app on the NST. The quicknav bar (which I don't use at all), opens instantaneously. Over time and use I've worked my tile selection down to 5 (6 for my NSTG), so I've been thinking about trying to adapt the quicknav bar to replace Quick Tiles. It doesn't have the gee-whiz stuff like the battery percentage, date, and so on, but the response time is what I'm after at this point in my life.