Search in sources :

Example 36 with InternalSelectionView

use of android.util.InternalSelectionView in project android_frameworks_base by crdroidandroid.

the class ListItemISVAndButton method createView.

@Override
protected View createView(int position, ViewGroup parent, int desiredHeight) {
    Context context = parent.getContext();
    final LinearLayout ll = new LinearLayout(context);
    ll.setOrientation(LinearLayout.VERTICAL);
    final InternalSelectionView isv = new InternalSelectionView(context, 8, "ISV postion " + position);
    isv.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, desiredHeight - 240));
    ll.addView(isv);
    final LinearLayout.LayoutParams buttonLp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 40);
    final Button topButton = new Button(context);
    topButton.setLayoutParams(buttonLp);
    topButton.setText("button " + position + ")");
    ll.addView(topButton);
    final TextView filler = new TextView(context);
    filler.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 200));
    filler.setText("filler");
    ll.addView(filler);
    return ll;
}
Also used : Context(android.content.Context) InternalSelectionView(android.util.InternalSelectionView) Button(android.widget.Button) TextView(android.widget.TextView) LinearLayout(android.widget.LinearLayout)

Aggregations

InternalSelectionView (android.util.InternalSelectionView)36 LargeTest (android.test.suitebuilder.annotation.LargeTest)12 MediumTest (android.test.suitebuilder.annotation.MediumTest)12 LinearLayout (android.widget.LinearLayout)12 Context (android.content.Context)6 ViewGroup (android.view.ViewGroup)6 Button (android.widget.Button)6 TextView (android.widget.TextView)6 ButtonAboveTallInternalSelectionView (android.widget.scroll.ButtonAboveTallInternalSelectionView)6