Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

- - - - -

SOLVED! custom_background_dialer from templatebread

  • Please log in to reply

OP philosophics

philosophics

Android Beginner

  • 2 posts

Posted 10 July 2011 - 08:57 PM #1

So I've been racking my brain for the past 3 days while losing hair in the process about trying to get my Dialer and Contacts screen have a transparent background.
Using Templatebread and even tried pushing the custom_background_dialer the old school way. Nothing is working the way I want it to.

Can someone please help me out here? Some screenshots of the problems I have...
Posted Image
And this is what happens when I type in a number...
Posted Image

Again, if anyone could help me out, it would be greatly appreciated. Also, let me know if you need anymore information.

This is one of the biggest obstacles I have from releasing this theme to the masses!

-

SOLVED!

I fused MrDSL's MIXER theme with my templatebread.
So far, I have 2 people to thank. MrDSL and Haxzamatic. Unfortunately, Haxzamatic has been MIA since May so he won't know for quite some time.

I will use this thread to post my theme when it's ready for an alpha release. But I won't be as fast as the rest of these guys/gals. So don't get too excited...

Posted Image

Edited by philosophics, 11 July 2011 - 02:20 AM.

  • 0 Likes

jharlin

jharlin

Android Beginner

Posted 15 August 2011 - 11:32 PM #2

I also have been trying to get this to work with no luck. Besides using his theme, what else did you do to solve it?
  • 0 Likes

JsinLegacy

JsinLegacy

THE MOST INTERESTING MAN IN ANDROID

Posted 16 August 2011 - 07:14 AM #3

Its very simple to change the dialer bg to be transparent or any image you so choose. I will just mention how to do it in the theme engine because I assume that is what you will be working with.

Anyways, if you decompile the contacts.apk and go into the values folder you will see the styles.xml. Open that up in whatever you choose, text pad, notepad, or Dreamweaver. Look at the first "set" of lines, what you want is there. So basically you are looking for this.

<style name="DialtactsTheme" parent="@android:style/Theme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>

now that you have that you want to edit is so that you can add a custom background to the dialer. Now you can make the background whatever you choose, any image, so we are going to have to add that as well, but that will be touched on in a minute. Just a note though, adding the custom background is the best option vs full transparency due to the fact that you can quickly adjust the transparency level if you need to. It is possible to make the dialer bg fully transparent without adding a custom background image. Anyways, lets move on. Now that we have the lines we need to edit lets do that.

The first line in that text you want to just add ".Wallpaper" at the end where is says /Theme. Please note the period applied between /Theme and Wallpaper. Now the last line you can just delete, we no longer really need that. As for the second line we won't be touching that at all so just ignore it. Now you need to add a line, I typically place it in between the two lines that are left but you can add to the end if you so choose.

The line will be set up similar to the other two. So go ahead and start it off with <item name="android:windowBackground">(this is where you place the location of the image you want to use)</item>

Once you complete that you're new set of lines should be similar to this:

<style name="DialtactsTheme" parent="@android:style/Theme.Wallpaper">
<item name="android:windowBackground">@drawable/custom_background_dialer</item>
<item name="android:windowNoTitle">true</item>

Note: I typically name the image I want to use "custom_background_dialer" but you are more than welcome to name it whatever you want, just remember it needs to be lowercase.

With your new set of lines you want to navigate to the values folder in the theme engine (decompiled (Windows) also or building from source). Whichever you so choose. Once there you want to open up the styles.xml and paste the new set of lines into that styles.xml. Just make sure it is between the <resources> </resources> .. You can save the xml now. Also, to make sure you add your background image to the appropriate folder, typically drawable-hdpi-finger folder.

Now you need to redirect the theme engine to call to these new items instead of using stock. So you need to navigate to the xml folder in the theme engine and find com_android_contacts.xml. With this open you are now going to add the lines to call to the image and the edit you made to the styles.xml. This is easy to do, you can already see how all the lines are set up so you will just set these new ones up the same way. If you look a the current list of lines you will notice they all pretty much point to drawables (<item name="drawable) & )@drawable/) but for the edit to the styles.xml just change where it says drawable to "style" and then "@style" and then "DialtactsTheme" after both.

Note: the quotations are not needed once you begin the @ portion of the line. So it should look like this when you are done.

<item name="style/DialtactsTheme">@style/DialtactsTheme</item>

now depending on what you are working with the line for custom_background_dialer is possibly already added. If you changed the name of it just edit the portions of the line that say custom_background_dialer to whatever the new name is. If the line is added than then that means the image is as well, so go edit that to the new name also. Just don't mess with the portion that says com_android_contacts_

Now just save that xml and you are pretty much good to go. This will allow you to have a custom image as a bg in your dialer. :) YAY!!!!

As a side task though to fully complete it. You need to pull the call_background.xml from the decompiled contacts and place it into the drawable folder. After you do this you will need to edit it as well and then redirect the contacts app. So after the edit you need to go into the com_android_contacts.xml located in the xml folder and add the line calling to this xml. Just set it up like the others.

Note: if you do not do this you will have black boxes that show up on the right side when you scroll through the other tabs on the dialer.

When you open it, it should look like this:

<item android:state_window_focused="false" android:drawable="@android:color/transparent" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@android:drawable/no_tile_128" />
<item android:state_focused="false" android:state_pressed="false" android:drawable="@android:drawable/screen_background_dark" />

basically you are just going to edit the very end of each line so that they look similar to this:

<item android:state_window_focused="false" android:drawable="@color/transparent" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@color/transparent" />
<item android:state_focused="false" android:state_pressed="false" android:drawable="@color/transparent" />

Once you complete this you can just save the xml. Now navigate to the colors.xml in the values folder and add a new color line. Its possible this line is already added as well, just listing this in case it is not.

Should look like:

<color name="transparent">#00000000</color>

This is the end of it all... now you can just compile and swap the image out until you find the one you like. The image for the dialer to fit is typically 480x800 but you can always play around with it.
  • 0 Likes

jharlin

jharlin

Android Beginner

Posted 09 November 2011 - 08:43 PM #4

I followed the guide posted above but when I push my compiled Contacts.apk to my phone, the Contacts and Phone apks no longer exist. Anyone have an answer as to what's going on?
  • 0 Likes

JsinLegacy

JsinLegacy

THE MOST INTERESTING MAN IN ANDROID

Posted 26 November 2011 - 06:08 PM #5

I followed the guide posted above but when I push my compiled Contacts.apk to my phone, the Contacts and Phone apks no longer exist. Anyone have an answer as to what's going on?


I just saw this are you still having issues or did you get it working...? sorry it has been so long to respond.

Also, I posted this for the theme engine ... did you just filter those parts out? Because its even easier if you are just doing contacts by itself

Edited by JsinLegacy, 26 November 2011 - 06:10 PM.

  • 0 Likes

jackstraw

jackstraw

@c_hale22

Posted 27 November 2011 - 07:51 AM #6

Nice tutorial jsin, adding to favs
  • 0 Likes

jharlin

jharlin

Android Beginner

Posted 29 November 2011 - 12:20 PM #7

I just saw this are you still having issues or did you get it working...? sorry it has been so long to respond.

Also, I posted this for the theme engine ... did you just filter those parts out? Because its even easier if you are just doing contacts by itself


Yes, I'm still having problems. I filtered out the theme engine parts. When I push my updated contacts.apk the contacts and phone apks disappear.


EDIT: Here is a link to the Contacts.apk I'm trying to push to my phone.

http://www.mediafire...b1ou1nsf1zsjlcr

Edited by jharlin, 29 November 2011 - 03:48 PM.

  • 0 Likes

JsinLegacy

JsinLegacy

THE MOST INTERESTING MAN IN ANDROID

Posted 30 November 2011 - 05:33 AM #8

Yes, I'm still having problems. I filtered out the theme engine parts. When I push my updated contacts.apk the contacts and phone apks disappear.


EDIT: Here is a link to the Contacts.apk I'm trying to push to my phone.

http://www.mediafire...b1ou1nsf1zsjlcr


Soon as I get on my laptop I will take a look. What ROM is it for?
  • 0 Likes

jharlin

jharlin

Android Beginner

Posted 30 November 2011 - 12:55 PM #9

Soon as I get on my laptop I will take a look. What ROM is it for?


CM 7.1 Thanks bro!!
  • 0 Likes

JsinLegacy

JsinLegacy

THE MOST INTERESTING MAN IN ANDROID

Posted 03 December 2011 - 12:48 PM #10

just to let you know I did not forget about this.. I just got side tracked making some wallpapers...
  • 0 Likes