Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add tablayout in ExpandablePlaceHolderView #163

Open
SushantPatekar opened this issue Aug 1, 2019 · 0 comments
Open

How to add tablayout in ExpandablePlaceHolderView #163

SushantPatekar opened this issue Aug 1, 2019 · 0 comments

Comments

@SushantPatekar
Copy link

SushantPatekar commented Aug 1, 2019

@janishar
I added Tab layout into HeaderView of ExpandablePlaceHolderView.
Once I expand //collapse ExpandablePlaceHolderView.It results tabs are getting added into headerview.

`

@parent
@SingleTop
@layout(R.layout.adapter_tablayout_hcm)
public class HCM_HeaderView {
private static String TAG = "HCM_HeaderView";
private Context mContext;
private String mHeaderText;
private ArrayList mHCMDetails;

@View(R.id.tabhost)
TabHost tabs ;

public ACPL_HCM_HeaderView(Context context, String headerText, String mHCMString,
                           ArrayList<HCMDetails> mHCMDetails) {
    this.mContext = context;
    this.mHeaderText = headerText;
    Log.d("LogDetails", mHCMString);

   this.mHCMDetails = mHCMDetails;


}

@Resolve
private void onResolve(){
    



    tabs.setup();
    TabHost.TabSpec spec = tabs.newTabSpec("tag1");
    spec.setContent(R.id.tab1);
    spec.setIndicator("First");
    tabs.addTab(spec);
    spec = tabs.newTabSpec("tag2");
    spec.setContent(R.id.tab2);
    spec.setIndicator("second");
    tabs.addTab(spec);

 
}

@Expand
private void onExpand(){
    Log.d(TAG, "onExpand");
}

@Collapse
private void onCollapse(){
    Log.d(TAG, "onCollapse");
}

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant