Setting tab heights

by Mark Murphy » Mon, 10 Aug 2009 22:52:25 GMT


Sponsored Links
 The only way I know of to change the heights of the tabs in a TabWidget
is via code akin to:

tabHost
        .getTabWidget()
        .getChildAt(0)
        .setLayoutParams(new LinearLayout.LayoutParams(width,height));

(and iterate from 0 to whatever to do all of the tabs)

This feels fragile. Is there a better solution, preferably one heartily
endorsed by the core Android team? I'm getting inquiries about this and
would like to address it in a book update someday.

Thanks!

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~---------~--~----~------------~-------~--~----~



Setting tab heights

by nEx.Software » Tue, 11 Aug 2009 05:54:16 GMT


 Personally, I subclassed TabHost, and TabWidget and provided my own
TabIndicator. Probably a lot more work than I had to do, but I am
custom drawing my tabs so I was OK with a little extra work for full
control.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Setting tab heights

by nEx.Software » Tue, 11 Aug 2009 05:58:03 GMT


 On second thought, I actually pulled the TabHost and TabWidget code
from the Android Open Source Project. I suppose I didn't subclass,
then.

On Aug 10, 2:53pm, "nEx.Software" <email.nex.softw...@gmail.com>



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Custom MediaPlayer Interface Thru JNI

Hi All,

I was trying to mimic the MediaPlayer Java interface provided by the
Android Framework by writing a similar Java-JNI layers. I have found
one observation regarding this.

case 1: The Java layer is very similar to the MediaPlayer.java code.
But on the JNI side, I am creating a thread ("pthread" to be
specific). This thread I will be using to send "start", "stop",
"pause" etc commands to the mediaplayer class in cpp. In this case I
am able to play the video file but Video is not visible. Audio is
playing fine!!!

case 2: Tha Java layer again is very similar to the MediaPlayer.java
code. But now I will not create a thread, but I will be using the UI
thread itself (JNI Layer) to send "start", "stop", "pause" etc
commands to the mediaplayer class in cpp. Now both Audio-Video is
playing fine.

Why there is a difference in behaviour in these 2 cases? Is it because
there is an extra thread in between the Java and the MediaPlayer
service? Even if there is thread why the difference in behaviour?

Kindly provide the reasons and the architecture used for rendering
frames.

Thanks in advance....
Sandeep

-- 

2. Siap Dikirim : Buku "membuat aplikasi untuk Android"

Dear alls

Untuk yang Order+Transfer buku sampai dengan Sabtu 13/03/2010 sebelum
jam 7 pagi, InsyaAllah buku akan dikirim hari itu ( Sabtu 13/03/2010)

Terimakasih

Salam GoAndroid

adi

-- 
"Indonesian Android Community [id-android]" 

3. to get/generate nonce. error in random, getBytes Options

4. android rfkill problems - again

5. request: Tutor install NDRIVE n link files required

6. Matrix broadband(pejing yopie)

7. update 3 [BajuDroid]