# Adding a bubble effect to stock text msg app



## alatedseraph (Jan 23, 2012)

I was wondering if any themers would be able to tell me how I could go about adding the bubble effect to the stock msg app instead of it just having a square background. I tried replacing the background hex with a drawable png even a .9 png so that it could stretch properly as a text got bigger but I cant seem to get anywhere on this. I want to learn how to actually do this not just find an app that has it for any people who decide to tell me go get go sms.


----------



## DaFatMack (Jul 9, 2011)

Ditto

Sent from my Galaxy Nexus using RootzWiki


----------



## SirOcelot (Oct 9, 2011)

DaFatMack said:


> Dido Ditto
> 
> Sent from my Galaxy Nexus using RootzWiki


*Fix'd*


----------



## bawb3 (Nov 20, 2011)

Dildo

Okay I may seem to be an adult but I'm really 12 years old on the inside.

Maybe try Go SMS?


----------



## Lurch81 (Jun 13, 2011)

I would love if our text app was as sexy as iPhone's but don't want to install a third party app stock works great

Sent from my Galaxy Nexus using RootzWiki


----------



## blackguy101 (Mar 25, 2012)

I honestly have to agree. The ONLY thing i loved from my old iphone was the texting app. Dont get me wrong i dont mind stock texting in android but imo the texting app on the iphone was much better.


----------



## Barf (Sep 26, 2011)

I want this as well. I don't need all the customization. Just the got damn bubbles.


----------



## Schoat333 (Jun 14, 2011)

alatedseraph said:


> I was wondering if any themers would be able to tell me how I could go about adding the bubble effect to the stock msg app instead of it just having a square background. I tried replacing the background hex with a drawable png even a .9 png so that it could stretch properly as a text got bigger but I cant seem to get anywhere on this. I want to learn how to actually do this not just find an app that has it for any people who decide to tell me go get go sms.


Hmm, sounds like that should work. What happens when you do this? Does it crash, or just not change anything?


----------



## alatedseraph (Jan 23, 2012)

Schoat333 said:


> Hmm, sounds like that should work. What happens when you do this? Does it crash, or just not change anything?


didnt change anything, I went into the layout message_list_item_recv.xml and changed the background to @drawable/receive_bubble then went to the drawable-xhdpi folder and to save time on creating or finding a proper bubble i grabbed the ic launcher sms mms png and colored in the smiley and then created a .9.png with it and renamed it. Then i exported the .9png into eclipse and into an apk and transferred the .9png and the .arsc file over to the old apk and then made and update zip and flashed in cwm.


----------



## Schoat333 (Jun 14, 2011)

alatedseraph said:


> didnt change anything, I went into the layout message_list_item_recv.xml and changed the background to @drawable/receive_bubble then went to the drawable-xhdpi folder and to save time on creating or finding a proper bubble i grabbed the ic launcher sms mms png and colored in the smiley and then created a .9.png with it and renamed it. Then i exported the .9png into eclipse and into an apk and transferred the .9png and the .arsc file over to the old apk and then made and update zip and flashed in cwm.


Did you copy the new message_list_item_recv.xml over to the old APK as well? (has to be compiled first of course.)


----------



## alatedseraph (Jan 23, 2012)

Schoat333 said:


> Did you copy the new message_list_item_recv.xml over to the old APK as well? (has to be compiled first of course.)


aww damnit lol i thought that was included in the .arsc let me try that see wat happens ill be back in a minute lol

edit: alright so interesting first attempt, the icon stretched out through the whole text including behind the avatar, neither the avatar nor the text msg itself were transparent though so most of the img was blocked out. ill get a screen soon


----------



## kenkoshko (Jul 23, 2011)

bawb3 said:


> Dildo
> 
> Okay I may seem to be an adult but I'm really 12 years old on the inside.
> 
> Maybe try Go SMS?


Lmao that actually made me laugh

Sent from my Galaxy Nexus using Tapatalk


----------



## alatedseraph (Jan 23, 2012)

updated a pic


----------



## Schoat333 (Jun 14, 2011)

It looks like the messaging app background is overriding your image.

I have wanted to try this myself, but haven't had the chance yet. I'll look into it and see if I can figure it out.

Sent from my Galaxy Nexus using RootzWiki


----------



## alatedseraph (Jan 23, 2012)

What I think we need to figure out instead is where the texts background array is set and change that to transparent or even change it from an array to the png that should do what we want.

And yes I am mostly guessing that the text background is an array haha.

but I say this because we dont want this png behind the avatar too so i think that we are looking in the wrong area to make this change.

edit I noticed it has a reference to list item background xml in the drawable folder and that has a hex code for black that would be used to make the array let me do some tinkering and see what I get.


----------



## Schoat333 (Jun 14, 2011)

alatedseraph said:


> What I think we need to figure out instead is where the texts background array is set and change that to transparent or even change it from an array to the png that should do what we want.
> 
> And yes I am mostly guessing that the text background is an array haha.
> 
> ...


nvm, I think You need to change it under textview.


----------



## alatedseraph (Jan 23, 2012)

alright! made some progress, so I was right when i found the liste item background xml is where the transparency is controlled for the text which means its also where we probably should make the change for it to be the png and not an array but this is where it loses me, seems that both the recv and send use this array so if we want 2 separate kinds of bubbles we need to split it up...


----------



## Schoat333 (Jun 14, 2011)

alatedseraph said:


> alright! made some progress, so I was right when i found the liste item background xml is where the transparency is controlled for the text which means its also where we probably should make the change for it to be the png and not an array but this is where it loses me, seems that both the recv and send use this array so if we want 2 separate kinds of bubbles we need to split it up...


Instead of changing it in the listitem_background.xml, try changing in in the the message_list_item_recv.xml

Change android:background="@drawable/listitem_background" to android:background="@drawable/YOUR_PNG_NAME".

I know there are a few of those in the message_list_item_recv.xml, so try changing the one on the line that starts with <textview.


----------



## alatedseraph (Jan 23, 2012)

Update on what I have so far I feel like Im right on the edge of getting this figured out! heres a pic


----------



## alatedseraph (Jan 23, 2012)

Schoat333 said:


> Instead of changing it in the listitem_background.xml, try changing in in the the message_list_item_recv.xml
> 
> Change android:background="@drawable/listitem_background" to android:background="@drawable/YOUR_PNG_NAME".
> 
> I know there are a few of those in the message_list_item_recv.xml, so try changing the one on the line that starts with <textview.


If i tell it to not go to the list item background at all then it doesnt have the pressed states offered by the xml it sends you too. That would probably work but lets see if we can keep the presses in.

i went into the list and chnaged it there

<item android:state_selected="true" android:drawable="@android:color/transparent" />
<item android:state_selected="false" android:state_pressed="true" android:drawable="@android:color/transparent" />
<item android:state_selected="false" android:drawable="@drawable/receive_bubble" />

In the recv and send list there are 2 separate ones for sending you to the listitem background the 2nd one is for the date the first I dunno. Let me tinker some more


----------



## Schoat333 (Jun 14, 2011)

alatedseraph said:


> If i tell it to not go to the list item background at all then it doesnt have the pressed states offered by the xml it sends you too. That would probably work but lets see if we can keep the presses in.
> 
> i went into the list and chnaged it there
> 
> ...


Ah, I didn't think about the pressed view. Good point.

I know it says ID date view, but sometimes Android is weird like that, and it end up being the entire text field.

I'm sure this can be done, you made a lot of progress already tho. Nice work!


----------



## alatedseraph (Jan 23, 2012)

So i changed the first one that was under linear view not the id date one and it turned out almost exactly the same as when i was changing the list selector one, so this will allow us to separate them until I figure out something about the pressed state!


----------



## alatedseraph (Jan 23, 2012)

My next step is to get the bubble to tighten up directly around the text instead of filling the whole text box area everytime.


----------



## Schoat333 (Jun 14, 2011)

alatedseraph said:


> My next step is to get the bubble to tighten up directly around the text instead of filling the whole text box area everytime.


The easiest way would probably be to put a transparent border, that's a few pixels wide, around the edges of the image.


----------



## alatedseraph (Jan 23, 2012)

Schoat333 said:


> The easiest way would probably be to put a transparent border, that's a few pixels wide, around the edges of the image.


I meant more specifically like this, notice the word whys bubble goes all the way out to the edge even though its put on wrap content and the words end way early.


----------



## Schoat333 (Jun 14, 2011)

Oh OK, I see what your saying. Let me know if you figure it out.


----------



## Schoat333 (Jun 14, 2011)

I figured out a solution to the pressed problem.

First, create a second listitem_bacground.xml in the drawables folder, and name it something like "listitem_backgroundsent.xml"

Next change the original one to display you recv image, and the new one to display your sent image.

Finally edit the message_list_item_send.xml to look at listitem_backgroundsent


----------



## Schoat333 (Jun 14, 2011)

I found out how to stop the bubble from stretching all the way, and only wrap the text as well.

You need to change the android:layout_alignParentRight="true"> to android:layout_alignParentRight="false"> In message_list_item_recv.xml.

An the same in send, except it will say left.


----------



## Lurch81 (Jun 13, 2011)

Yeah! Looking like you guys have figured it out! Won't be long and we'll have some pretty sweet SMS themes I feel

Sent from my Galaxy Nexus using RootzWiki


----------



## MR H3LLMAN (Oct 20, 2011)

This thread gets 5 stars. Just FYI I'm implementing this technique in my theme haha.

Sent from my Galaxy Nexus using RootzWiki


----------



## Schoat333 (Jun 14, 2011)

MR H3LLMAN said:


> This thread gets 5 stars. Just FYI I'm implementing this technique in my theme haha.
> 
> Sent from my Galaxy Nexus using RootzWiki


Sounds good. Let me know if you have any questions.


----------



## alatedseraph (Jan 23, 2012)

Schoat333 said:


> I found out how to stop the bubble from stretching all the way, and only wrap the text as well.
> 
> You need to change the android:layout_alignParentRight="true"> to android:layout_alignParentRight="false"> In message_list_item_recv.xml.
> 
> An the same in send, except it will say left.


heck yea nice find man I was looking at those trying to find definitions of what each does too lol


----------



## alatedseraph (Jan 23, 2012)

Schoat which parts did you change in the list item background? just the 3rd line or multiple ones?


----------



## Schoat333 (Jun 14, 2011)

alatedseraph said:


> Schoat which parts did you change in the list item background? just the 3rd line or multiple ones?


Just the third line. I pointed it to my new image instead of the color.


----------



## alatedseraph (Jan 23, 2012)

yea ok I think I got it here goes the install lol

awwwwww force close when i open a msg









oops forgot to put them in eclipse first! try number 2!

wow i messed up somewhere bad lol. first the date made a 2nd drawable inside the first and only the receive one showed up at all


----------



## Schoat333 (Jun 14, 2011)

alatedseraph said:


> yea ok I think I got it here goes the install lol
> 
> awwwwww force close when i open a msg
> 
> ...


Oh yeah, I forgot about. Change the date background to a hex with the first two digits as zeros.

#00ffffff is what I used.

I think you could also delete the android background from the date line completely.

Sent from my Galaxy Nexus using RootzWiki


----------



## dhaliwal925 (Jun 7, 2011)

Freaking amazing guys can't wait! I have my illustrater, photoshop, and fireworks open and ready


----------



## Lurch81 (Jun 13, 2011)

Any update on this

Sent from my Galaxy Nexus using RootzWiki


----------



## JBirdVegas (Jun 11, 2011)

Why don't you do this from source? It will be much easier than trying to hack in new features


----------



## 2302jason (Jan 22, 2012)

1. Retrieve original bubble images from iPhone SMS app
2. Add it into the Android SMS app
3. Remove grey box around the bubbles
4. Amazing mod is amazing
5. Eat some ham


----------



## Schoat333 (Jun 14, 2011)

Lurch81 said:


> Why don't you do this from source? It will be much easier than trying to hack in new features


There are no code changes needed. Its only XML edits. You would change the exact same files in source.

It can definitely be done that way, but there's no need.

Sent from my Galaxy Nexus using RootzWiki


----------



## Lurch81 (Jun 13, 2011)

Can't wait for this

Sent from my Galaxy Nexus using RootzWiki


----------



## MisterEff (Jan 2, 2012)

no doubt I'm excited about the work here but am I the only one who doesn't like the iPhone bubbles? I even changed the style to Android when I was using handcent

Sent from my Galaxy Nexus using Tapatalk


----------



## alatedseraph (Jan 23, 2012)

http://rootzwiki.com/topic/21780-how-to-create-a-bubble-mms-app/ its how to guide! Make sure to thank schoat!


----------



## hindsgn (Feb 12, 2012)

LOL i'm sure i'll get called lazy but is there a way for you guys to add this as a zip. This is like the only thing I want to add to the stock messaging app.


----------

