androidqq菜單
Ⅰ Android QQ 左右滑動菜單彈出效果怎麼實現
Android 實現類似QQ側滑菜單,實現左右側滑 源碼。具有iOS 7/8 parallax effect 風格的側邊菜單,類似於最新版qq的菜單效果。ReisdeMenu 創意靈感來自於Dribbble1還有2,而這個是Android版的ResideMenu,在視覺效果上部分參考了iOS版的RESideMenu
Ⅱ 安卓手機qq菜單鍵在哪2015
剛開QQ時的主界面左上角頭像的左邊,是不是看到有豎著的3個點?點頭像位置,即可打開菜單。你提問的「菜單鍵」在哪,如果上面不是你想問的答案,那繼續看:
主界面右上角三個橫線,點開還有菜單;
按住某條消息,也會彈出菜單;
按住菜單鍵或叫多任務鍵(就是手機上除了返回、HOME的那個鍵),也會彈出菜單。
大概就這么多了……
Ⅲ android開發如何實現折疊菜單類似qq分組
用ExpandableListView來實現,可以設置其中的子ListView是展開還是閉合
一、ExpandableListView介紹
一個垂直滾動的顯示兩個級別(Child,Group)列表項的視圖,列表項來自ExpandableListAdapter 。組可以單獨展開。
1.重要方法
expandGroup (int groupPos) :在分組列表視圖中 展開一組,
setSelectedGroup (int groupPosition) :設置選擇指定的組。
setSelectedChild (int groupPosition, int childPosition, boolean shouldExpandGroup) :設置選擇指定的子項。
getPackedPositionGroup (long packedPosition) :返回所選擇的組
getPackedPositionForChild (int groupPosition, int childPosition) :返回所選擇的子項
getPackedPositionType (long packedPosition) :返回所選擇項的類型(Child,Group)
isGroupExpanded (int groupPosition) :判斷此組是否展開
2.代碼:
ExpandableListContextMenuInfo menuInfo=(ExpandableListContextMenuInfo)item.getMenuInfo();
String title=((TextView)menuInfo.targetView).getText().toString();
int type=ExpandableListView.getPackedPositionType(menuInfo.packedPosition);
if (type==ExpandableListView.PACKED_POSITION_TYPE_CHILD) {
int groupPos =ExpandableListView.getPackedPositionGroup(menuInfo.packedPosition);
int childPos =ExpandableListView.getPackedPositionChild(menuInfo.packedPosition);
二、ExpandableListAdapter
一個介面,將基礎數據鏈接到一個ExpandableListView。 此介面的實施將提供訪問Child的數據(由組分類),並實例化的Child和Group。
1.重要方法
getChildId (int groupPosition, int childPosition) 獲取與在給定組給予孩子相關的數據。
getChildrenCount (int groupPosition) 返回在指定Group的Child數目。
2.代碼
public class MyExpandableListAdapter extends BaseExpandableListAdapter {
// Sample data set. children[i] contains the children (String[]) for groups[i].
public String[] groups = { "我的好友", "新疆同學", "親戚", "同事" };
public String[][] children = {
{ "胡算林", "張俊峰", "王志軍", "二人" },
{ "李秀婷", "蔡喬", "別高", "餘音" },
{ "攤派新", "張愛明" },
{ "馬超", "司道光" }
};
public Object getChild(int groupPosition, int childPosition) {
return children[groupPosition][childPosition];
}
public long getChildId(int groupPosition, int childPosition) {
return childPosition;
}
public int getChildrenCount(int groupPosition) {
return children[groupPosition].length;
}
public TextView getGenericView() {
// Layout parameters for the ExpandableListView
AbsListView.LayoutParams lp = new AbsListView.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, 64);
TextView textView = new TextView(ExpandableListDemo.this);
textView.setLayoutParams(lp);
// Center the text vertically
textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
// Set the text starting position
textView.setPadding(36, 0, 0, 0);
return textView;
}
public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
View convertView, ViewGroup parent) {
TextView textView = getGenericView();
textView.setText(getChild(groupPosition, childPosition).toString());
return textView;
}
public Object getGroup(int groupPosition) {
return groups[groupPosition];
}
public int getGroupCount() {
return groups.length;
}
public long getGroupId(int groupPosition) {
return groupPosition;
}
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
ViewGroup parent) {
TextView textView = getGenericView();
textView.setText(getGroup(groupPosition).toString());
return textView;
}
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
}
public boolean hasStableIds() {
return true;
}
}
參考自:http://blog.csdn.net/gyflyx/article/details/6461242