Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4539926
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:00:55+00:00 2026-05-21T15:00:55+00:00

Hi all I’m trying to write a tab activity in which each of the

  • 0

Hi all
I’m trying to write a tab activity in which each of the tabs has a custom view for the indicator.
The view is inflated like so:

LayoutInflater inflater = (LayoutInflater)
            context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
        specIndicatorView = inflater.inflate(R.layout.tab_indicator, null);

        indicatorIv = (ImageView)specIndicatorView.findViewById(R.id.indicatorImage);
        indicatorTv = (TextView)specIndicatorView.findViewById(R.id.indicatorText);

        indicatorIv.setImageDrawable(context.getResources().getDrawable(indicatorImageRes));
        indicatorTv.setText(indicatorTextRes);

The problem is that the layout parameters that are defined in the child view do not affect it and that is because I don’t know how to pass in the parent view to the inflate method.

All I’m trying to do is have an image and some text where the image is aligned to the top and the text is aligned to the bottom of the indicator view but I also need some little tweaks that require me to use this indicator strategy.
I’ve looked at the source of the entire tab mechanism and could not figure out how to get the parent view, do you know how to do it?
do you have a better way to achieve what I need?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T15:00:56+00:00Added an answer on May 21, 2026 at 3:00 pm

    You said you looked through all the code for tabs; what was wrong with just calling getTabWidget() in your activity?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All , Say you have a code in a View like this. <img src='@Url.Action(GetCaptchaImg)'
All my datepickers have an automatically-generated hidden field which has the same ID as
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
All, If I run a query like the following: $qry = Select wrong_column from
all. We're trying to get some intersect collisions working, but the problem experience is
All of a sudden, Facebook sharing has stopped working on my site. It's been
I am trying to understand how to use SyndicationItem to display feed which is
All, I have a SQL Database class structure like public class Database : ISqlObject,
All, is there any means by which it is possible to connect to two
All, My classpath has been set to the following folder: CLASSPATH = .;C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.