Setup a Email Link - Java for Android App Development

Hi there, looking to see if anyone knows how to set a email link from XML Coding?
Cheers

t3hShmo said:
Hi there, looking to see if anyone knows how to set a email link from XML Coding?
Cheers
Click to expand...
Click to collapse
Hi,
For TextView you can use android:autoLink = "email" property.
Something like this:
Code:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="email"
android:text="[email protected]" />

strings.xml
Code:
<string name="my_email_link"> send an <a href=mailto:[email protected]>Email</a> to developer</string>
. Then create textview, and setText() to example string.
Noted to self thrice via tapatalk

Related

[REQ][DEV] Can someone edit this for me?

I need to remove the clock from my status bar, I know that it's /res/layout/tw_status_bar.xml but I can't decompile anything to save my life, it's getting in the way of my theme! Can someone help me out, thanks!
I believe this line needs to be removed:
<com.android.systemui.statusbar.policy.Clock android:textSize="19.0dip" android:textColor="#ffa6a6a6" android:gravity="left|center" android:id="@id/clock" androidaddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
please post your log, so we can see the problem on why you cant decompile, i also had something in my theme, stoping it from recompiling, then i took a look at the log, with some help from my fellow xda users, so maybe i can help you, because i got this log thing down now, once its out of your theme, you can compile and recompile freely
I don't know how, that's why I can't decompile it!
Sent from my GT-I9100 using xda app-developers app
Installing framework-res.apk is needed for decompiling systemui
Try "apktool if framework-res.apk"
PS. Don't use apk manager. Use the real apktool
Sent from my GT-I9100 using xda premium

[Q] Any solutions on how to remove 5 toggles on Stock ROM

Hello guys, specially for Themers.
Anyone of you knows how to remove the toggles on the statusbar expanded? If anyone could help me that could be highly appreciated.
Dunno if this working or not but u can try this...
Quickpanel_quick_setting.xml change every framelayout height to "0.0dip"
Sent from my GT-S5360 using Tapatalk 2
Try this:
in the Quickpanel_quick_setting.xml
Look for
Code:
<LinearLayout android:orientation="vertical" android:focusable="false" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_height">
replace
Code:
android:layout_height="@dimen/quick_setting_button_height"
with this
Code:
android:layout_height="0.0dip"
hope it works
remember to make a backup though
d3cka said:
Dunno if this working or not but u can try this...
Quickpanel_quick_setting.xml change every framelayout height to "0.0dip"
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
DarkZied said:
Try this:
in the Quickpanel_quick_setting.xml
Look for
Code:
<LinearLayout android:orientation="vertical" android:focusable="false" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_height">
replace
Code:
android:layout_height="@dimen/quick_setting_button_height"
with this
Code:
android:layout_height="0.0dip"
hope it works
remember to make a backup though
Click to expand...
Click to collapse
nope, neither worked. @DarkZied There's no LinearLayout in statusbar_expanded.xml. There's framelayout. Changed that wo 0.0dip, didn't work as well
Just add lidroid 15 toggles, then go into settings and uncheck every toggle.
Sent from my GT-S5830i - Hit thanks if I helped

[QUESTION] Change settings icons with theme. How make it?

Hi!
I want make new theme for LG Launcher and I want change icons in settings app (Display, Sound etc). How do this without edit LGSettings.apk and without edit LGEasySettings?
I tried add strings in \res\xml\theme_resource.xml
Example:
Code:
<AppIcon name="com.android.settings/com.android.settings.DisplaySettings" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.Settings$DisplaySettingsActivity" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.lge.PouchSettings" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.lge.ScreenMode" image="settings_display" />
But icons not change (2nd screenshot), icons change only in top tittle (1st screenshot)
x-zes said:
Hi!
I want make new theme for LG Launcher and I want change icons in settings app (Display, Sound etc). How do this without edit LGSettings.apk and without edit LGEasySettings?
I tried add strings in \res\xml\theme_resource.xml
Example:
Code:
<AppIcon name="com.android.settings/com.android.settings.DisplaySettings" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.Settings$DisplaySettingsActivity" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.lge.PouchSettings" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.lge.ScreenMode" image="settings_display" />
But icons not change (2nd screenshot), icons change only in top tittle (1st screenshot)
Click to expand...
Click to collapse
That isn't possible with a home theme. It would be cool if you could though.
App icons change wherever they are shown including the title/action bar so that's why it changes at the top.
Questions belong in Q&A section, for future reference. Welcome to the forum.
If try extract code and layouts from LGEasySettings.apk and put this code and layouts with change icons name in theme apk?
Is it possible to when apply theme with code from LGEasySettings.apk and work this from theme? In other words, insert LGEasySettings.apk in theme.
x-zes said:
If try extract code and layouts from LGEasySettings.apk and put this code and layouts with change icons name in theme apk?
Is it possible to when apply theme with code from LGEasySettings.apk and work this from theme? In other words, insert LGEasySettings.apk in theme.
Click to expand...
Click to collapse
I finally did changing the png's:
http://www.htcmania.com/showthread.php?t=811479
I can somebody replace icons in LGEasySettings.apk and LGSettings.apk. But I want replace icons when apply my theme without edit LGEasySettings.apk and LGSettings.apk
x-zes said:
I can somebody replace icons in LGEasySettings.apk and LGSettings.apk. But I want replace icons when apply my theme without edit LGEasySettings.apk and LGSettings.apk
Click to expand...
Click to collapse
When it comes to mod something you got to make some ultimate changes in order to get it your way.
If you don't wanna mess around, then there is one solution: go to Hogwarts become a magician
x-zes said:
I can somebody replace icons in LGEasySettings.apk and LGSettings.apk. But I want replace icons when apply my theme without edit LGEasySettings.apk and LGSettings.apk
Click to expand...
Click to collapse
Not possible. The only way I can think to edit the pngs without editing LGEasySettings.apk and LGSettings.apk is with an xposed module.
Hi could you please tellme which file you edited to make the settings menu, black? Thanks in advance
Sent from my LG-E980 using XDA Free mobile app

[TUTORIAL]Add the "Delete" button on the screenshot preview

Requirement:
1. apktool 1.5.2
2. Notepad++
3. Deodex System
---------------------------------------------------
1. Decompile SystemUI.apk
2. Download delete_button.rar from attachment and merge to your SystemUI.apk
3.Open /res/value/stings with Notepad++ add the following lines:
<string name="screenshot_delete_action">Delete</string>
<string name="screenshot_delete_confirmation">Screenshot deleted.</string>
<string name="permdesc_screenshot">Capture screenshot</string>
<string name="permlab_screenshot">Allows the app to cature a screenshot. This is protected by SystemUI.</string>
<string name="screenshot_toast">Screenshot in %1$d seconds</string>
Click to expand...
Click to collapse
4.Now compile your SystemUI.apk
5.Now decompile the SystemUI.apk you just compiled
6.Navigate to com/android/systemui/screenshot/DeleteScreenshot.smali
7. find 0x7f090049 delete id
And replace your id
<public type="string" name="screenshot_delete_confirmation" id
Click to expand...
Click to collapse
8.Navigate to SystemUI\smali\com\android\systemui\screenshot\SaveImageInBackgroundTask.smali
find id and delete id and replace your id
0x10405b7 (-Framework-res- public.xml) = <public type="string" name="share"
0x7f09007b = <public type="string" name="screenshot_saving_ticker"
0x7f09007c = <public type="string" name="screenshot_saving_title"
0x7f09007d = <public type="string" name="screenshot_saving_text"
0x7f0200f2 = <public type="drawable" name="stat_notify_image"
0x7f020022 = <public type="drawable" name="ic_menu_share"
0x7f020021 = <public type="drawable" name="ic_menu_delete"
0x7f090048 = <public type="string" name="screenshot_delete_action"
0x7f09007e = <public type="string" name="screenshot_saved_title"
0x7f09007f = <public type="string" name="screenshot_saved_text"
Click to expand...
Click to collapse
9. AndroidManifest.xml
find
Code:
<service android:exported="false" android:name=".screenshot.TakeScreenshotService" android:process=":screenshot"/>
and change to
Code:
<service android:name=".screenshot.TakeScreenshotService" android:permission="android.permission.SCREENSHOT" android:exported="false" android:process=":screenshot">
<intent-filter>
<android name="android.intent.action.SCREENSHOT" />
</intent-filter>
</service>
<receiver android:name=".screenshot.DeleteScreenshot" android:exported="true" />
<service android:name=".LoadAverageService" android:exported="true" />
find
<uses-permission android:name="android.permission.CRYPT_KEEPER" />
Click to expand...
Click to collapse
change to
Code:
<uses-permission android:name="android.permission.CRYPT_KEEPER" />
<protected-broadcast android:name="android.permission.SCREENSHOT" />
<protected-broadcast android:name="android.intent.action.SCREENSHOT" />
<permission android:label="@string/permlab_screenshot" android:name="android.permission.SCREENSHOT" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_screenshot" />
10. Save the file and close it.
11. Now recompile your SystemUI.apk and sign it.
12. Enjoy!
Thanks - grisha84
Screenshotes
Nice bro, will try it
A very useful tutorial indeed great work!!
@sportik555
Nice work m8 as always.
Do you know how to add clear all button in recent apps? Or know some tutorial?
Thanks
thanks
please fix all
.parameter "xxx"
Click to expand...
Click to collapse
because i use apktool_2.0.0rc3 to decompile my systemUI and its dont have .parameter only have .param p1, "xxx"
p/s : i've fixed it already but why dont have delete confirm message ?
devilmaycry2020 said:
thanks
please fix all because i use apktool_2.0.0rc3 to decompile my systemUI and its dont have .parameter only have .param p1, "xxx"
Click to expand...
Click to collapse
you need Apktool 1.5.2
Dzepar said:
@sportik555
Nice work m8 as always.
Do you know how to add clear all button in recent apps? Or know some tutorial?
Thanks
Click to expand...
Click to collapse
I know, but you need to check, give systemUI and I try
sportik555 said:
you need Apktool 1.5.2
Click to expand...
Click to collapse
why dont use newest apktool ? old apktool can't decompile android 4.4
and maybe you missed add a call parameter to DeleteScreenshot.smali in GlobalScreenshot.smali .i'm using android 4.3
devilmaycry2020 said:
why dont use newest apktool ? old apktool can't decompile android 4.4
and maybe you missed add a call parameter to DeleteScreenshot.smali in GlobalScreenshot.smali .i'm using android 4.3
Click to expand...
Click to collapse
smali for apktool 1.5.2 , old can decompile 4.4
maybe you missed add a call parameter to DeleteScreenshot.smali in GlobalScreenshot.smali
Click to expand...
Click to collapse
no it is not necessary to do,tested 3 sony android 4.4 phones and work delete button
sportik555 said:
smali for apktool 1.5.2 , old can decompile 4.4
no it is not necessary to do,tested 3 sony android 4.4 phones and work delete button
Click to expand...
Click to collapse
i said it worked but what string "screenshot_delete_confirmation" use for ? i mean when i press delete icon it dont show any confirm message want to delete or not.
devilmaycry2020 said:
i said it worked but what string "screenshot_delete_confirmation" use for ? i mean when i press delete icon it dont show any confirm message want to delete or not.
Click to expand...
Click to collapse
screenshot_delete_confiramation use for DeleteScreenshot.smali
6.Navigate to com/android/systemui/screenshot/DeleteScreenshot.smali
7. find 0x7f090049 delete id
And replace your id
Quote:
<public type="string" name="screenshot_delete_confirmation" id
Click to expand...
Click to collapse
i mean when i press delete icon it dont show any confirm message want to delete or not
Click to expand...
Click to collapse
you are wrong edited AndroidManifest.xml .
sportik555 said:
I know, but you need to check, give systemUI and I try
Click to expand...
Click to collapse
It's from Xperia J JB 4.1.2.
SystemUI
Thanks
sportik555 said:
screenshot_delete_confiramation use for DeleteScreenshot.smali
you are wrong edited AndroidManifest.xml .
Click to expand...
Click to collapse
So string "screenshot_delete_confirmation" is useless it didn't show anywhere. how do you know i were wrong edited AndroidManifest.xml? i've not upload any my file to you.
anyway here is my file.
Dzepar said:
[MENTION=5555617]
Do you know how to add clear all button in recent apps? Or know some tutorial?
Click to expand...
Click to collapse
All you needed was a little research. http://forum.xda-developers.com/showthread.php?t=2614356 (I prefer the Z3 style)
Can OP please disable emoticons in the first post? It's annoying to copy code and there are some emoticons in the middle..
And yes there is an option to disable emoticons on the post... Just edit it properly or put
Code:
[/ code] in the code sections... Not QUOTE..
Enviado do meu SM-N9005 através de Tapatalk
joluke said:
Can OP please disable emoticons in the first post? It's annoying to copy code and there are some emoticons in the middle..
And yes there is an option to disable emoticons on the post... Just edit it properly or put
Code:
[/ code] in the code sections... Not QUOTE..
Enviado do meu SM-N9005 através de Tapatalk[/QUOTE]
I find 1 emotions post and post edit
Click to expand...
Click to collapse
Papanik said:
All you needed was a little research. http://forum.xda-developers.com/showthread.php?t=2614356 (I prefer the Z3 style)
Click to expand...
Click to collapse
i don't think so, maybe he want it look like this.
works great on my z1 compact using z3 SystemUI, thanks
Gave error recompile . see the log below...

[MOD] Center clock and the battery charge in percent for stock 5.0.1

hi everyone... here is another mod from me
install from recovery
for odex/deodex stock rom 5.0.1
fix on lock screen if charge phone and reupload mod
if you have odex system, then after installation of this mod,wipe cache
Hi, thanks for this mod! Can you please show us how you did that by making a tutorial. Also is it possible to add the percentage number next to the battery icon? (see attached screenshot).
iliass01 said:
Hi, thanks for this mod! Can you please show us how you did that by making a tutorial. Also is it possible to add the percentage number next to the battery icon? (see attached screenshot).
Click to expand...
Click to collapse
add smali
decompile my mod and use diff
in C:\ApkTools200RC3m\SystemUI\res\layout\system_icons.xml (this im hide stock batt icon)
android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip"
in C:\ApkTools200RC3m\SystemUI\res\layout\status_bar.xml (this clock in center)
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/notification_icon_area_inner" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
in C:\ApkTools200RC3m\SystemUI\res\layout\signal_cluster_view.xml (this text batt in %)
Code:
<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
in values\dimens.xml
<dimen name="keyguard_carrier_text_margin">156.0dip</dimen> (its for center operator logo on lockscreen)
Is it possible for you to increase the size of the number and the percentage to fit to the icons next to it? And a "revert to stock" flashable zip would be great! :fingers-crossed::good:
Could someone post a flashable zip with the battery percentage next to the stock battery icon please?
Is it possible to get am/pm?
---------- Post added at 06:11 PM ---------- Previous post was at 06:00 PM ----------
Thanks for the wonderful mods btw
First of all, thanks for your mod! Good work
For me I've made a little change in the "SystemUI\res\layout\signal_cluster_view.xml "
Code:
<com.erryy.BatteryText [B][color=red]android:textSize="@dimen/battery_level_text_size"[/B][/color] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
so the percent matches better to the rest in size.
Dirk64 said:
First of all, thanks for your mod! Good work
For me I've made a little change in the "SystemUI\res\layout\signal_cluster_view.xml "
Code:
<com.erryy.BatteryText [B][color=red]android:textSize="@dimen/battery_level_text_size"[/B][/color] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
so the percent matches better to the rest in size.
Click to expand...
Click to collapse
Dirk, can you show us a screenshot and post your flashable zip? Would be great! Thank you very much in advance ::good:
This is a screenshot of the mod but I've made other changes to the framework-res.apk and the SystemUI to change dpi of the NavBar.
I can upload but it's at home on my computer so it will be tomorrow if you want and if it's okay for this is not my thread and I don't want to open a new one.
Dirk64 said:
This is a screenshot of the mod but I've made other changes to the framework-res.apk and the SystemUI to change dpi of the NavBar.
I can upload but it's at home on my computer so it will be tomorrow if you want and if it's okay for this is not my thread and I don't want to open a new one.
Click to expand...
Click to collapse
That looks real nice, great job. Can you please also make a zip to flash back to stock. thanks, man :good:
I think, it's garynynch's thread and I'm pretty sure, he can do this also. It's only a small change in one xml and I don't want to post things based on his work as mine here.
hi Can you please do a flashable zip for Center clock, battery icon and %
Try this and let me know how it turns out. Unsure about the lock screen.
Change SystemUI\res\layout\system_icons.xml on line 6 from
PHP:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="7.0dip" />
to
PHP:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="9.5dip" android:layout_height="14.5dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="7.0dip" />
Change SystemUI\res\layout\signal_cluster_view.xm on line 15 from
PHP:
<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
to
PHP:
<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="@dimen/battery_level_text_size" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Here is another one without the center clock & carrier name
I flashed your mod and it does work. How can I have battery percent to right the battery icon? Thank you.
@ garynynch, I've got the second percent charging notification in the lockscreen disabled by changing this line in the keyguard_status_bar.xml:
Code:
<TextView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" [B][color=red]android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip"[/color][/B] android:importantForAccessibility="noHideDescendants" android:paddingEnd="@dimen/battery_level_padding_end" android:layout_marginStart="@dimen/header_battery_margin_keyguard" />
hope, it helps
What line would I need to edit in order to add am/pm to the time? The numbers just look to plain on their own (I use 12hr time)
Also, how difficult is it to add a circle-percent battery mod? We can take the images from CM's circle battery mod with percent. I'm guessing the framework and/or systemUI will need much tweaking (or is it completely different on Lollipop?)
tonysansone said:
I flashed your mod and it does work. How can I have battery percent to right the battery icon? Thank you.
Click to expand...
Click to collapse
These are the tools I used
tool to compare xml & smali files
to view and edit xml & smali files
to decompile and recompile apks
to sign zip files
Good luck
Thanks mate. But I needed to know the code and the xml file that I must modify to move to right of the battery icon the percent text.
Sent from my Nexus 4 using XDA Free mobile app

Categories

Resources