[DEVELOP HELP] how todo a "enter" in android xml code - Hero, G2 Touch Q&A, Help & Troubleshooting

hi guys,
very soon i'm getting a HTC Hero, and i'd like to develop apps for it.
Finally i got the hello world thing working
but, i've got a question, i want todo a "enter" in my code, like this:
hello
my name is..
my age is..
here is my code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="text">Deze applicatie zal snel en gemakkelijk uw batterijniveau laten zien.
Batterijniveau: </string>
<string name="app_name">Battery, Level</string>
</resources>
this is strings.xml
could someone please say to me how todo a "enter"

I really am clueless about Android development but have you tried using \n?

yeah!!
it works man!!
very very very much thx!!!
you really helped me

Not to be blunt but not only do HTC have a good battery widget already but are you sure that's the best thing to do if you have no coding/scripting experience?
For example, I think it's pretty much basic knowledge that \n is a newline.
Maybe you should try for something a little easier?

Related

[THEME] A Community Honeycomb Theme ** Needs your help ** 5/17/11

****************************************************************************************************
DO NOT FLASH IF YOU DON'T PLAN ON IMPROVING THIS THEME - IT'S NOT READY!
****************************************************************************************************
I think this could be a cool thing. A community built theme.
Partly for me to learn, partly because that's what we are about, right?
I need the help of the talented themers/developers on here though.
My idea:
Take this INCREDIBLE honeycomb theme done by obsessionXYZ (his thread) and port it to our phone.
I am specifically aiming for Trigger 3.2, but I can't see why it would not work for any 2.2 based ROM.
I think just letting everyone throw in their own personal flavor to make this better.
Not going to lie, I have basically done all that I know to do. Not looking for someone to do my work. Looking for someone willing to take this and make it better, but to post what they did. maybe a bit much, but it would be a very cool thing to do and I know a lot of us would learn.
NOTE, for those interested in doing this. STRONGLY suggest looking at Official_Masters thread on using APK Manager to theme.
It is Crazy simple. So much so that I am embarrased to post this thread as any sort of "work" - It was not.
SOMEONE put a lot of time into it (see above - obsessionXYZ), certainly not me.
How would this work?
Well... I'm certain there are a lot of good ways, but the only way I can think of is dropbox or just downloading what I currently have, and make it better.
****************************************************************************************************
DO NOT FLASH IF YOU DON'T PLAN ON IMPROVING THIS THEME - IT'S NOT READY!
****************************************************************************************************
UPDATES (very minor, very much beta)
5.11.11 - made some of the changes birgertime suggested. Got some white in the dropdown notification for text..
now I need to find that (make the text white) for the power menu, and when adding widgets...
DOWNLOAD THE THEME HERE >>>> BETA DOWNLOAD
Here is the wallpaper (doesnt appear the theme is setting it by default yet):
{
"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"
}
KNOWN BUGS:
I do not know how to make the text white, so it's currently black text on a black background. Awesome. Working on it. Go as I learn.
I do not know how to make the volume sliders thin (like honeycomb and the original theme)
Not all of the power menu buttons are blue
Notification dropdown transparent now, original theme has a blue halo on a solid black background
I want it to say "Rotate" not "Auto-Rotation" but I can't find that
The bluetooth toggle does not work, neither does auto rotate. Awesome.
I am sure there are more I have not found yet. Help me find and squash them.
* I am not a fan of this type battery. I plan on changing that soon.
Honeycomb Bootup:
I found a flashable Honeycomb bootup on TeamWhiskey's site (THREAD). You can download the file (CLICK HERE TO DOWNLOAD).
Simply move to internal and flash like a ROM. Bam. Awesome bootup.
Here is it on my phone:
IMAGES:
SPECIAL THANKS - SERIOUSLY, TRULY APPRECIATED
Birgertime - Not only for an AMAZING ROM for us, but the guy has been so patient with my dumb questions. DUMB questions.
Official_Master (his thread and offering help), Junk_Druggler (lots of advice), rel500, buddahlou, shreddintyres, Master&Slaveā„¢, and Annex for offering to help (and even do a theme and give me credit, haha) AND the dock in the images above.
you guys get the point. ALMOST EVERY SINGLE PERSON WHO THEMES HAS VOLUNTEERED TO HELP ME! I LOVE THIS COMMUNITY.
I'm certain I forgot people, shoot me a PM if I did. It was not intentional. I am tired.
Yeap, forgot 00.ante who did the themed market (his thread)
JaiThemes did the wallpaper and I just manipulated it in Photoshop to change it from cyan to blue. Didn't do much more than that.
most of those bugs are xml related, simple edits will fix them, I'll download and take a look, I wanna help, since it was this thread that made me want to make a theme
thanks
ld006 said:
most of those bugs are xml related, simple edits will fix them, I'll download and take a look, I wanna help, since it was this thread that made me want to make a theme
thanks
Click to expand...
Click to collapse
That is awesome. Yeah, I haven't a clue how to edit.xml. I also noticed the original that I linked to had a LOT of .jar's which I removed. I'll search more on how to edit.xml. Birgertime was pointing me in the right direction, but I was exhausted last night.
I think I've seen even a better looking one than that. I going to try and find the link.
rel500 said:
I think I've seen even a better looking one than that. I going to try and find the link.
Click to expand...
Click to collapse
Cool. I was impressed, a lot, by the original but am all for a better version.
Remember though, my pics are missing a lot of the coolness the original had. I'm hopeful we can bring that to this.
I already have the boot logo does that affect anything?
s15274n said:
I do not know how to make the text white, so it's currently black text on a black background. Awesome.
I do not know how to make the volume sliders thin (like honeycomb and the original theme)
Not all of the power menu buttons are blue
Notification dropdown is a flat black, original theme has a blue halo look at the top
I want it to say "Rotate" not "Auto-Rotation" but I can't find that
The bluetooth toggle does not work
I am sure there are more I have not found yet. Help me find and squash them.
* I am not a fan of this type battery. I plan on changing that soon.
Click to expand...
Click to collapse
Always looking for something to kill time with - If any of this still needs fixed tonight, I'll do it.
jellette said:
Always looking for something to kill time with - If any of this still needs fixed tonight, I'll do it.
Click to expand...
Click to collapse
If anyone can fix this, I know you can. I would LOVE for you to take a swing at this.
sRs DoLLaR mEnU said:
I already have the boot logo does that affect anything?
Click to expand...
Click to collapse
I only included the bootup if someone wanted it. I actually prefer the stock Trigger boot, so this is not included in the theme.
Since this is a community theme, let's all make Callip do all the work himself!
in /framework-res.apk/res/layout/status_bar_latest_even_content.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingLeft="10.0dip" android:paddingTop="7.0dip" android:paddingRight="10.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:paddingTop="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.server.status.AnimatedImageView android:id="@id/icon" android:layout_width="25.0dip" android:layout_height="25.0dip" android:src="@drawable/arrow_down_float" android:scaleType="fitCenter" />
<TextView android:textSize="18.0sp" android:textStyle="bold" android:textColor="[B][COLOR="red"]#ff000000[/COLOR][/B]" android:ellipsize="marquee" android:id="@id/title" android:paddingLeft="4.0dip" android:fadingEdge="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="14.0sp" android:textColor="[B][COLOR="Red"]#ff515151[/COLOR][/B]" android:ellipsize="marquee" android:id="@id/text" android:paddingLeft="4.0dip" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<android.widget.DateTimeView android:textSize="14.0sp" android:textColor="[B][COLOR="red"]#ff515151[/COLOR][/B]" android:id="@id/time" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:singleLine="true" />
</LinearLayout>
</LinearLayout>
Those are the three colors for the dropdown notifications. Not sure if you know this, but the hex code is as follows
# <opacity 2-bit hex> <color 6 bit hex>
Click to expand...
Click to collapse
=======================================================
Also to change the text color for the extra menu (this might also fix the power menu text):
in styles.xml
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">?textAppearanceLarge</item>
</style>
I believe you can change that ?textAppearanceLarge to ?textAppearanceLargeInverse and it will fix the issue.
==================================================
The power menu icons-> View attachment ic_locks.zip
In my farmework they are named hawk_download, hawk_recovery, hawk_reboot
birgertime said:
Since this is a community theme, let's all make Callip do all the work himself!
in /framework-res.apk/res/layout/status_bar_latest_even_content.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingLeft="10.0dip" android:paddingTop="7.0dip" android:paddingRight="10.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:paddingTop="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.server.status.AnimatedImageView android:id="@id/icon" android:layout_width="25.0dip" android:layout_height="25.0dip" android:src="@drawable/arrow_down_float" android:scaleType="fitCenter" />
<TextView android:textSize="18.0sp" android:textStyle="bold" android:textColor="[B][COLOR="red"]#ff000000[/COLOR][/B]" android:ellipsize="marquee" android:id="@id/title" android:paddingLeft="4.0dip" android:fadingEdge="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="14.0sp" android:textColor="[B][COLOR="Red"]#ff515151[/COLOR][/B]" android:ellipsize="marquee" android:id="@id/text" android:paddingLeft="4.0dip" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<android.widget.DateTimeView android:textSize="14.0sp" android:textColor="[B][COLOR="red"]#ff515151[/COLOR][/B]" android:id="@id/time" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:singleLine="true" />
</LinearLayout>
</LinearLayout>
Those are the three colors for the dropdown notifications. Not sure if you know this, but the hex code is as follows
=======================================================
Also to change the text color for the extra menu (this might also fix the power menu text):
in styles.xml
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">?textAppearanceLarge</item>
</style>
I believe you can change that ?textAppearanceLarge to ?textAppearanceLargeInverse and it will fix the issue.
==================================================
The power menu icons-> View attachment 589674
In my farmework they are named hawk_download, hawk_recovery, hawk_reboot
Click to expand...
Click to collapse
This won't directly help this theme, without the additional resources, but I have moved on to using custom xml's for these types of things, which allows greater control - I feel.
Code:
<item name="textColor">@color/edt_tw_button_text_inversible</item>
Is what the line for primary pop-up menu text looks like lately - while the secondary menus have their own xml.
Anyway, just the way I've started to do it.
jellette said:
This won't directly help this theme, without the additional resources, but I have moved on to using custom xml's for these types of things, which allows greater control - I feel.
Code:
<item name="textColor">@color/edt_tw_button_text_inversible</item>
Is what the line for primary pop-up menu text looks like lately - while the secondary menus have their own xml.
Anyway, just the way I've started to do it.
Click to expand...
Click to collapse
resource is already there, I've done this numerous times with stock frameworks
Depends on the build. JVH, for one, does not contain this in the colors folder and has to be added.
It also does not contain tw_primary_icon_text_light.xml
jellette said:
Depends on the build. JVH, for one, does not contain this in the colors folder and has to be added.
It also does not contain tw_primary_icon_text_light.xml
Click to expand...
Click to collapse
No it's all in the Android resource class
birgertime said:
No it's all in the Android resource class
Click to expand...
Click to collapse
I think you put a comma in my sentence or something, I wasn't saying your way wouldn't work, I was saying mine wouldn't without adding the xml - rather than using the "?textAppearanceLargeInverse "
lol, when I said it wouldn't work, it was a preface to the next part of my next sentence.
jellette said:
I think you put a comma in my sentence or something, I wasn't saying your way wouldn't work, I was saying mine wouldn't without adding the xml - rather than using the "?textAppearanceLargeInverse "
lol, when I said it wouldn't work, it was a preface to my next sentence.
Click to expand...
Click to collapse
Oh LOL, I just misinterpreted that whole conversation.
I'm going to slowly walk away. I should have never doubted your wisdom!
Edit:
lol, when I said it wouldn't work, it was a preface to the next part of my next sentence.
Click to expand...
Click to collapse
Yeah that's the part I misread lol
This is great. If I hadn't drank so much I'd start now. Thank you guys. Not going to lie, sounds foreign to me. Look forward to learning. Thank you both, so much
has anyone seen this thread?
http://forum.xda-developers.com/showthread.php?t=1057234
^ maybe I missed it, but that would only be helpful if you are on CM7 right?
I will try and make the changes birgertime suggested. That seems to make a lot more sense. Jellette, I am way too ignorant for you my friend.. and birgertime, he is just crazy patient with me, ha.
I don't mind publicly embarrassing myself, you guys are awesome.
What J did, Callip, was just make his own XML and define his own colors so he could just make calls to them and know exactly what they are.
Sent from my SGH-T959 using Tapatalk

[Q][Theming] How fix dark text on dark background Dialog on Gingerbread?

Hi!
I've got the following problem:
I'm on JellyBlast 3 (Gingerbread, I guess) with my Galaxy Y and I'm a little unhappy with the theme that comes with JellyBlast. I have fixed some issues but I cannot figure out how to avoid black text on dark background in Alert Dialogs. This issue makes some dialogs of the hololauncher and some other apps completely ureadable if you do not turn the screen to full brightness (what I normally don't do).
I'm not quite sure, if this is possible at all...
What I've found out so far:
In the Gingerbread source the Theme for the the Alert Dialog is hard coded:
Code:
protected AlertDialog(Context context) {
this(context, com.android.internal.R.style.Theme_Dialog_Alert);
}
I'm not yet allowed to post external links... I found the above on github in the gingerbread branch in platform_frameworks_base -> core -> java -> android -> app -> AlertDialog.java
The hololauncher uses the AlertDialog.Builder class to create the Dialogs and it uses a TextView Widget to display the text. The layout looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<TextView android:textAppearance="?android:textAppearanceLargeInverse" android:gravity="center_vertical" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight" android:drawablePadding="14.0dip" />
Here you see, that the textAppearanceLargeInverse definition of the theme is used as text color. And the theme should always be "Theme.Dialog.Alert" since this is hardcoded.
I assume that com.android.internal.R.style.Theme_Dialog_Alert refers to the Theme.Dialog.Alert styledefinition in the ROMs framework-res.apk. So I added the following line to the styles.xml in framework-res.apk -> values/styles.xml inside Theme.Dialog.Alert:
Code:
<item name="textAppearanceLargeInverse">@style/TextAppearance.Large</item>
I hoped that this would overwrite the definition of textAppearanceLargeInverse for the AlertDialog so that I will not use the inherited definition of the dark theme. The color that's referenced by @style/TextAppearance.Large is (contrary to ...Large.Inverse) is #FFFFFFFF or at least close to it.
Unfortunately this does not work and I do not understand why. I got that far to figure all this stuff out and my phone seems little impressed by my effort. It still displays dark text on dark background.
The other changes I made took effect so I do not think that I'm doing something basically wrong. Can anyone help me with that?
Kanalpiroge said:
Hi!
I
Click to expand...
Click to collapse
try this one Guide

Statusbar gps icons/images location?

As the title says, i wish to know where are these 2 gps icons (the blue satellite is in systemui, i mean the other 2 green ones).
Searched and decompiled everywhere but i couldn't find them.
SS follow attached, waiting for your amswers...
Thanks
Sent from Hacker's U via XDA app
hackerpower said:
As the title says, i wish to know where are these 2 gps icons (the blue satellite is in systemui, i mean the other 2 green ones).
Searched and decompiled everywhere but i couldn't find them.
SS follow attached, waiting for your amswers...
Thanks
Click to expand...
Click to collapse
Are you thinking about this icon?
Its " stat_sys_battery_charge_anim3" from \res\drawable-hdpi in framework-res.apk
No, that's a battery icon.
I'm searching for the icon that alternates with the satellite flashing when it's trying to lock the gps and for the icon that appears when the gps gets that lock. 2 icons.
Sent from Hacker's U via XDA app
Yes, i know that the icon i gave you its for battery, but the "icon that alternates with the satellite flashing when it's trying to lock the gps... " in your screenshot its the icon for battery , and that's the wrong icon, it should be another one
edit:
I think that your SystemUI point's to a wrong icon from the framework, its not a framework bug, its SystemUI bug, i had that problem so..
pirej said:
Yes, i know that the icon i gave you its for battery, but the "icon that alternates with the satellite flashing when it's trying to lock the gps... " in your screenshot its the icon for battery , and that's the wrong icon, it should be another one
edit:
I think that your SystemUI point's to a wrong icon from the framework, its not a framework bug, its SystemUI bug, i had that problem so..
Click to expand...
Click to collapse
But the untouched stock rom showed the same icons...
Can you post SS of your gps icons flashing and locked?
Thanks
My phone is little... not feeling well
I flashed someone's rom, and after factory reset.. boot-loop...so, im thinking what to do, what ftf to flash.. e.t.c.
But, if you decompile your SystemUI, and go to "SystemUI.apk\res\drawable\stat_sys_gps_acquiring_anim.xml " you should see the error
It should be something like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="500" android:drawable="@drawable/stat_sys_gps_acquiring" />
<item android:duration="500" android:drawable="@*android:drawable/stat_sys_gps_on" />
</animation-list>
And not like the one below or similar..
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="500" android:drawable="@drawable/stat_sys_gps_acquiring" />
<item android:duration="500" android:drawable="@*android:drawable/stat_sys_data_wimax_signal_disconnected" />
</animation-list
When i wake up my phone ill make screenshots, but you can try my mod with toggles and framework, or just the toggles(SystemUI), its for stock xperia u b.1.100 , and i know that i had no icon bugs for gps or any other icon bug.
pirej said:
My phone is little... not feeling well
I flashed someone's rom, and after factory reset.. boot-loop...so, im thinking what to do, what ftf to flash.. e.t.c.
But, if you decompile your SystemUI, and go to "SystemUI.apk\res\drawable\stat_sys_gps_acquiring_anim.xml " you should see the error
It should be something like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="500" android:drawable="@drawable/stat_sys_gps_acquiring" />
<item android:duration="500" android:drawable="@*android:drawable/stat_sys_gps_on" />
</animation-list>
And not like the one below or similar..
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="500" android:drawable="@drawable/stat_sys_gps_acquiring" />
<item android:duration="500" android:drawable="@*android:drawable/stat_sys_data_wimax_signal_disconnected" />
</animation-list
When i wake up my phone ill make screenshots, but you can try my mod with toggles and framework, or just the toggles(SystemUI), its for stock xperia u b.1.100 , and i know that i had no icon bugs for gps or any other icon bug.
Click to expand...
Click to collapse
You're right! This is what i have:
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="500" android:drawable="@drawable/stat_sys_gps_acquiring" />
<item android:duration="500" android:drawable="@*android:drawable/stat_sys_battery_charge_anim2" />
</animation-list>
I was using fared xtreme moded systemui, he made that mistake, thanks pirej
No problem, glad to help.
I have a working phone now
This are screenshots of gps search and lock
Pirej my friend, yet another problem.
Now when the gps is aquiring a satellite the right icons flash alternatively, but when it gets a lock it changes to that battery icon.
Isn't there another. Xml that has to be edited?
Thanks in advance
Sent from Hacker's U via XDA app
Code:
Isn't there another. Xml that has to be edited?
Probably there is, but.. ill have to look for it
Again, you can use my moded SystemUI and Framework.. just for testing purposes, the 2 of them are 100 compatible and without icon bugs.
I tried my SystemUI (bug-less for b.1.100) on ics b.1.10 STOCK, and it had wrong gps icons, so.. it may have something to do with your framework too
I dont have too much free time this day's, but if you give me your Framework and SystemUI maybe i can do something.
pirej said:
Code:
Isn't there another. Xml that has to be edited?
Probably there is, but.. ill have to look for it
Again, you can use my moded SystemUI and Framework.. just for testing purposes, the 2 of them are 100 compatible and without icon bugs.
I tried my SystemUI (bug-less for b.1.100) on ics b.1.10 STOCK, and it had wrong gps icons, so.. it may have something to do with your framework too
I dont have too much free time this day's, but if you give me your Framework and SystemUI maybe i can do something.
Click to expand...
Click to collapse
Here you go...
https://mega.co.nz/#!h95iyD4D!WGCy0BzzZRaAGxOGb25DuXq7iUEn9DhO5pgB0BsHYT8
Sorry, i cant find the reason for the wrong icon showing..
Strange...no clue?
Sent from Hacker's U via XDA app
No problem, already fixed it!
Thanks for everything pirej :thumbup:
Sent from Hacker's U via XDA app
hackerpower said:
No problem, already fixed it!
Thanks for everything pirej :thumbup:
Sent from Hacker's U via XDA app
Click to expand...
Click to collapse
Great, could you tell me how you fix it ?
Flashed latest fared xtreme tron statusbar and moded from there.
I was using an old version because of how it looked.
Sent from Hacker's U via XDA app

JAVA class ImageButton animation on click before next activity

Greetings, I hope someone can help. I know the solution is "simple" - as in, a few words or lines to change. I just cannot figure it out.
I have an app. It's on the Play Store and fully functional, and so now I am trying to improve the UI. I am having trouble with MainActivity.java for a specific goal.
OBJECTIVE: an ImageButton on click animation and then next activity launches:
(1) User clicks image button
(2) Image button is animated (according to an anim XML file)
(3) THEN next activity is launched after button shows the animation
What I can already do:
I can make next activity just launch, no animation (code below shows this lack of animation)
I can make the image animate on click, but not launch next activity.
I can make it do both at the same time (animation starts but then is quickly interrupted by next activity)
MainActivity.java
Code:
/** Help Page Activity No Animation*/
public void gotohelp(View view) {
Intent intent = new Intent(this, HelpPageActivity.class);
startActivity(intent);
}
anim_rotate.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="500"
android:startOffset="0"
android:repeatCount="1"
android:repeatMode="reverse" />
</set>
activity_main.xml:
Code:
<ImageButton
android:autoLink="web"
android:linksClickable="true"
android:id="@id/questionButton"
android:background="#00000000"
android:src="@drawable/question"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:onClick="gotohelp"
android:contentDescription="@string/question" />
MainActivity.Java whole file is here: http://pastebin.com/4HztRmK3. Relevant code starts at line 196.
Thanks X 1000 for any help. If I pull out any more hair I will need to join a club.
I know I might have to go to StackOverflow with this but I love my XDA peeps. I'm bumping this just one time, because it has almost no views...
Anybody happen to know what I'm missing here?

Removing Carrier (Network Operator) from Lockscreen

All of the guides/methods/apps/mods I have read are out of date and do not work on the LG G2 since updating to Lollipop. I have tried xposed framework "Remove carrier" and this does also not work for me.
I have decompiled the framework-res.apk and had a look inside for the file "res/layout/keyguard_screen_tab_unlock.xml" as per this thread but it does not exist.
I can find the following though:
In "public.xml" the following lines:
<public type="string" name="keyguard_label_text" id="0x0104039c" />
<public type="string" name="lockscreen_carrier_default" id="0x0104039e" />
In strings.xml the following line:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout androidrientation="vertical" android:background="#ff000000" androidaddingTop="20.0dip" androidaddingBottom="20.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" androidaddingStart="20.0dip" androidaddingEnd="20.0dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:textSize="16.0sp" android:textStyle="bold" android:textColor="#ffffffff" android:id="@id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/keyguard_label_text" />
</LinearLayout>
I wonder if I remove the 16.0sp above it will go away?
I wonder if I remove the string in quotes under the other two lines in public.xml it would go away.
Probably more to it than that.
I could not find reference to anything else anywhere that seemed like the place to affect it. It's not a big deal really. Just thought I would try to get rid of it.
just try textSize="0.0sp"
maybe in LGSystemUI?
Sorry the larger text section above was from the file named "keyguard.xml" rather than strings. Sorry, my mistake. I might try changing the "textsize=16.0sp" to "textsize=0.0sp" and see what happens.
Are you solved?
Hello, i've successfully removed the carrier and also moved the charging text right under the clock and date. You can check my thread in the themes section. I'll be releasing the version with the removed carrier and with some other nice things like unlocked weather animations, next alarm text etc in the coming day or two.
Sent from my LG-D802 using XDA Free mobile app
Is there any way to replace the text with a custom one without using xposed? And maybe in statusbar too.

Categories

Resources