FindViewById on Custom Title Bar within Tab Activity?

You can access the TextView and ImageView by declaring them public static in the TabActivity Then, in the Sub-Activity you obviously access the public static TextView and ImageView like Main_Tab_Activity.textView. SetText("my_text_view").

You can access the TextView and ImageView by declaring them public static in the TabActivity. Then, in the Sub-Activity you obviously access the public static TextView and ImageView like, Main_Tab_Activity.textView. SetText("my_text_view").

That worked for me :) Thanks Lalit – rizzz86 Oct 14 at 14:07.

If you put Custom Title bar only in Main TabActivity that Title bar will appears in all of your Sub-TabActivity. For Example if you gave Custom title Bar in Main TabActivity : requestWindowFeature(Window. FEATURE_CUSTOM_TITLE); setContentView(R.layout.

Main_layout); getWindow(). SetFeatureInt(Window. FEATURE_CUSTOM_TITLE,R.layout.

Header_layout); TextView tv = (TextView) findViewById(R.id. ViewTitleId); ImageView image = (ImageView)findViewById(R.id. ImageTitleId); there is no need to give in all you Sub-tab Activity.In all sub-Tab Activity you just set setContentView(R.layout.

Sub_layout).

Yes @Venky we can access both textview and imageview in the main tabactivity. But I want to access ImageView in my sub-tab activities. I want different behavior of ImageView on each sub-tab.

– rizzz86 Oct 14 at 13:30 @rizzz86 Why you need to use that Image in sub Activity? By default it will appear in all Sub Activity Right? – Venky Oct 14 at 13:33 Yes it is appearing on all sub activities.

But I need different behavior on each sub-tab when I click on the ImageView. For example when click on ImageView with 1st opening tab it will store value in table1 and if click on ImageView with 2nd opening tab it will store value in table2 etc – rizzz86 Oct 14 at 13:36 @rizzz86 Come to chat.stackoverflow. Com/rooms/1531/casual-chat chat room..we will discuss – Venky Oct 14 at 13:37 Thanks for your support @Venky.

I got the answer from Lalit Poptani – rizzz86 Oct 14 at 14:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions