我想開發一個導航抽屜,onNavItemClick
我想以顯示連接至particullar導航項目(NAV抽屜必須保持打開狀態) 一個彈出窗口,如果有人已經實現了這個請提供一個鏈接。
這是我的代碼片段。
@Override
public void onNavigationDrawerItemSelected(int position) {
switch(position)
{
case 0:
mTitle = getString(R.string.history);
fragment_ride_history = new ListView(this);
popupWindow = new PopupWindow(
fragment_ride_history,
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
popupWindow.setOutsideTouchable(true);
popupWindow.setFocusable(true);
popupWindow.setBackgroundDrawable(newBitmapDrawable());
popupWindow.showAtLocation(new LinearLayout(this), Gravity.END, 10, 10);
popupWindow.update(50, 50, 1500, 900);
popupWindow.setContentView(fragment_ride_history);
// this is to call webservice and append the data on listview
getData(1);
fragment_ride_history.setOnScrollListener(new
break;
}
}
popupWindow.showAsDropDown(anchorview,0,0,Gravity.RIGHT); – justDroid
有點。我正在查找顯示在我的圖像鏈接中的視圖。 –