1

I'm using this library: https://github.com/sephiroth74/HorizontalVariableListView

I need to add the component "it.sephiroth.android.library.widget.HListView" to my layout programmatically.

I've tried this but nothing is visible...

View w;
    w=new it.sephiroth.android.library.widget.HListView(MainActivityDynamic.this);
    w.setMinimumHeight(500);
    w.setMinimumWidth(500);
    w.setBackgroundColor(getResources().getColor(R.color.red));
    linear1.addView(w, 0);

What is wrong?

Borja
  • 1,269
  • 1
  • 17
  • 30

1 Answers1

1

Define your HListView in a XML file, than inflate it in your code and add it programmatically using addView.

Alessandro Verona
  • 1,157
  • 9
  • 23