[HELP] Looking for the best solution for game control - General Questions and Answers

{
"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 am trying to add several game controls and stats display (i.e. score..etc) over my game similar as the sample above. What would be the best solution? I am thinking of overlay. If overlay is the best solution, would anyone able to offer some code sample of building a overlay control+display on top of a game? Any information would be greatly appreciated. Thanks.

This is my main.xml layout file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
androidrientation="vertical" >
<home.net.RedAlertView android:id="@+id/RedAlertView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fire!"/>
</FrameLayout>
Click to expand...
Click to collapse
I have two questions.
1. According to the document, FrameLayout stacks views one on top of other, How do I ensure the Button view is always stacked on top of my custom game view?
2. The custom game view constantly refreshes itself, how could I be certain it does not overwrite the button view (even if the button view is stack on top of it)?

Related

[MOD] 4-Way Reboot For Stock Rooted LB3

I know much of you are probably on CM9, AOKP or a custom rom (AEON)(Shameless Plug) and really need this. I'm sure there are a select few that might.I know there is already an EMP, this one is just easy to do. All props to kahvitahra and his great guide you can follow here.
{
"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"
}
If you wish to do your own here is a little help to get you started while following his guide.
Once you decompile the policy.jar
In the Open GlobalActions.smali search for this line:
- "Lcom/android/internal/policy/impl/GlobalActions$3;"
(Change 3 to 99. There will be two of them. The other 3 will be a line down)
SAVE!
And in the GlobalActions$SinglePressAction.smali
Change this:
-.method static constructor ()V
TO THIS
.method static constructor <clinit> ()V
After following his directions editing GlobalActions$SinglePressAction.smali before saving check this post to make sure your spacing is correct.
kahvitahra guide. There is a zip file to download with three smali files you will need after you decompile the policy.jar
Thx bigfau....
updated the ISET page >>Mod section, with your 4 Way...looky looky...:cyclops:
http://forum.xda-developers.com/showpost.php?p=25111013&postcount=1
Awesome post! Thanks for your contribution .
Thanks Big, it was the <clinit> I didn't catch, mine was <init> lol, friggin syntax!

Notification pulldown image

Would any of you fine gents tell me where/name of the image circled in red?
Thank you kindly
{
"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"
}
bumpskeez
mastamoon said:
bumpskeez
Click to expand...
Click to collapse
heres where the code starts in tw_statusbar_expanded.xml
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/status_bar_expanded_notification_height" />
you can read it there and modify as necessary
racinwarrior said:
heres where the code starts in tw_statusbar_expanded.xml
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/status_bar_expanded_notification_height" />
you can read it there and modify as necessary
Click to expand...
Click to collapse
I was just coming back here to post I had found it. Figures!! Even though I changed this line earlier today and it didnt work, but that must have been a compile issue on my part.
SystemUI.apk > res > layout > tw_status_bar_expanded.xml
Line 33:
From:
Code:
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
To:
Code:
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
Line 37:
From:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
To:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/notificationCart" android:background="#ff000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
Thanks for looking and for your help racinwarrior
ScreenShot:

[tutorial] Remove StatusBar Clock For Roms without the option

This is A tut to remove the clock in the status bar clock. I have had a few request for this on a few roms. So I decided I would post how to do this.
{
"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"
}
Okay lets get to it.
Decomplete the SystemUI.apk
(If you have errors post them and I will do my best to help you out)
Next look in the layout fold.
Look for the status_bar.xml
Look for this line of code
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Delete it.
Then recomplete the apk.
(The same as before if you have errors post and I will do my best)
more mods...........
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
..................
For those of us who are morons, could you explain how to "decomplete" the system ui and recomplete the apk?
Sent from my HTC One X using xda app-developers app
smolck said:
For those of us who are morons, could you explain how to "decomplete" the system ui and recomplete the apk?
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
This right here will probably be the easiest for noobs on windows
http://forum.xda-developers.com/showthread.php?p=33815550

[Q][MOD]Notification Panel Toggle Resizing

I'm modding System-UI.apk file.
I'm trying port samsung notification panel to jb cm10
{
"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"
}
to
So, First target is get bigger toggles.
And i'm searching for dimension codes in layout and dimen.xml
So, i changed
Code:
<dimen name="notification_panel_header_height">48.0dip</dimen>
<dimen name="notification_panel_brightness_height">48.0dip</dimen>
<dimen name="notification_panel_widget_height">160.0dip</dimen> 48 to 160
<dimen name="notification_panel_header_and_widget">208.0dip</dimen> and equals
<dimen name="notification_panel_header_widget_and_brightness">208.0dip</dimen> same
<dimen name="notification_panel_header_and_brightness">96.0dip</dimen> same
but didn't work after also changed res/layout/system_bar_notification_panel_title.xml -
Code:
<TableLayout android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="16.0dip" android:layout_marginBottom="16.0dip" android:stretchColumns="8" android:shrinkColumns="4" -- here 2,4 to 4
android:layout_alignParentLeft="true" android:layout_alignParentBottom="true">
and then
power_widget_button.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:id="@id/power_widget_button" android:background="@drawable/stat_power_background" android:focusable="true" android:clickable="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@id/power_widget_button_image" android:layout_width="fill_parent" android:layout_height="70.0dip" 48 to 70 dip
android:scaleType="center" android:layout_weight="1.0" />
</LinearLayout>
but didn't work which file i should edit...
i will do something like this
first get bigger toggles
and then change toggle button drawables with samsung toggles(not orginal one , create full drawable toggle like a in picture)

[GUIDE][GB] How to resize activity title bar like Windows Phone

ONLY FOR BEGINNER
{
"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"
}
This is a simple mod... you only need to resize..
What you need??
1. Your framework-res.apk
2. Knowledge about how to decompile and recompile APKs files
Let's begin!
1. Decompile your framework-res.apk
2. Open style.xml on res/values/here
3. Search this code:
Code:
<item name="windowTitleSize">XXX</item>
4. change the value "XXX" to "70.0px"
#Change the value to resize the height of your activity title bar
5. find this code
Code:
<style name="TextAppearance.WindowTitle" parent="@style/TextAppearance">
find this below that code "
Code:
<item name="textSize">XXX</item>
" and change the value XXX to "40.0sp"
6. recompile your framework-res.apk
7. push it into "system/framework/HERE"
8. reboot
Simple, right...
Press Thanks button if I help you..
Thank you
#MYKH
Thank for shared, sir!
mrkimi84 said:
Thank for shared, sir!
Click to expand...
Click to collapse
You are welcome sir
Sent from my A8T using xda premium

Categories

Resources