android.widget.StackView Java Examples

The following examples show how to use android.widget.StackView. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java    From codeexamples-android with Eclipse Public License 1.0 6 votes vote down vote up
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
StackView stk = (StackView)this.findViewById(R.id.stackView1);

ArrayList<StackItem> items = new ArrayList<StackItem>();
items.add(new StackItem("text1", this.getResources().getDrawable(R.drawable.ic_launcher)));
items.add(new StackItem("text2", this.getResources().getDrawable(R.drawable.ic_launcher)));
items.add(new StackItem("text3", this.getResources().getDrawable(R.drawable.ic_launcher)));
items.add(new StackItem("text4", this.getResources().getDrawable(R.drawable.ic_launcher)));
items.add(new StackItem("text5", this.getResources().getDrawable(R.drawable.ic_launcher)));

StackAdapter adapt = new StackAdapter(this, R.layout.item, items);

stk.setAdapter(adapt);

}
 
Example #2
Source File: DSL.java    From anvil with MIT License 4 votes vote down vote up
public static BaseDSL.ViewClassResult stackView() {
  return BaseDSL.v(StackView.class);
}
 
Example #3
Source File: DSL.java    From anvil with MIT License 4 votes vote down vote up
public static Void stackView(Anvil.Renderable r) {
  return BaseDSL.v(StackView.class, r);
}
 
Example #4
Source File: DSL.java    From anvil with MIT License 4 votes vote down vote up
public static BaseDSL.ViewClassResult stackView() {
  return BaseDSL.v(StackView.class);
}
 
Example #5
Source File: DSL.java    From anvil with MIT License 4 votes vote down vote up
public static Void stackView(Anvil.Renderable r) {
  return BaseDSL.v(StackView.class, r);
}