Skip to content

Instantly share code, notes, and snippets.

@janishar
Created August 24, 2016 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janishar/d69c8bb8d146cc4a130f1e8d063e9c99 to your computer and use it in GitHub Desktop.
Save janishar/d69c8bb8d146cc4a130f1e8d063e9c99 to your computer and use it in GitHub Desktop.
public class MainActivity extends AppCompatActivity {
private ExpandablePlaceHolderView mExpandableView;
private Context mContext;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mContext = this.getApplicationContext();
mExpandableView = (ExpandablePlaceHolderView)findViewById(R.id.expandableView);
for(Feed feed : Utils.loadFeeds(this.getApplicationContext())){
mExpandableView.addView(new HeadingView(mContext, feed.getHeading()));
for(Info info : feed.getInfoList()){
mExpandableView.addView(new InfoView(mContext, info));
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment