Methods Summary |
---|
private static android.view.View | combineAdjacent(android.view.View views)
if (views.length < 2) {
throw new IllegalArgumentException("you should pass at least 2 views in");
}
final LinearLayout ll = new LinearLayout(views[0].getContext());
ll.setOrientation(LinearLayout.HORIZONTAL);
final LinearLayout.LayoutParams lp =
new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1.0f);
for (View view : views) {
ll.addView(view, lp);
}
return ll;
|
public android.util.InternalSelectionView | getLeftIsv()
return (InternalSelectionView)
((ViewGroup) mLeftListView.getChildAt(0)).getChildAt(0);
|
public android.widget.ListView | getLeftListView()
return mLeftListView;
|
public android.util.InternalSelectionView | getLeftMiddleIsv()
return (InternalSelectionView)
((ViewGroup) mLeftListView.getChildAt(0)).getChildAt(1);
|
public android.util.InternalSelectionView | getRightIsv()
return (InternalSelectionView)
((ViewGroup) mRightListView.getChildAt(0)).getChildAt(1);
|
public android.widget.ListView | getRightListView()
return mRightListView;
|
public android.util.InternalSelectionView | getRightMiddleIsv()
return (InternalSelectionView)
((ViewGroup) mRightListView.getChildAt(0)).getChildAt(0);
|
protected void | onCreate(android.os.Bundle savedInstanceState)
super.onCreate(savedInstanceState);
final int desiredHeight = (int) (0.8 * getWindowManager().getDefaultDisplay().getHeight());
mLeftListView = new ListView(this);
mLeftListView.setAdapter(new AdjacentISVAdapter(desiredHeight));
mLeftListView.setItemsCanFocus(true);
mRightListView = new ListView(this);
mRightListView.setAdapter(new AdjacentISVAdapter(desiredHeight));
mRightListView.setItemsCanFocus(true);
setContentView(combineAdjacent(mLeftListView, mRightListView));
|