當前位置:首頁 » 安卓系統 » androidqq菜單

androidqq菜單

發布時間: 2022-12-19 12:37:10

Ⅰ Android QQ 左右滑動菜單彈出效果怎麼實現

Android 實現類似QQ側滑菜單,實現左右側滑 源碼。具有iOS 7/8 parallax effect 風格的側邊菜單,類似於最新版qq的菜單效果。ReisdeMenu 創意靈感來自於Dribbble1還有2,而這個是Android版的ResideMenu,在視覺效果上部分參考了iOS版的RESideMenu

安卓手機qq菜單鍵在哪2015

剛開QQ時的主界面左上角頭像的左邊,是不是看到有豎著的3個點?點頭像位置,即可打開菜單。你提問的「菜單鍵」在哪,如果上面不是你想問的答案,那繼續看:

  1. 主界面右上角三個橫線,點開還有菜單;

  2. 按住某條消息,也會彈出菜單;

  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

熱點內容
redhat存儲 發布:2025-07-02 11:12:50 瀏覽:585
優酷不能用流量緩存 發布:2025-07-02 11:10:46 瀏覽:940
彩虹島小草怎麼設置腳本 發布:2025-07-02 11:10:33 瀏覽:921
越壓縮越封閉 發布:2025-07-02 11:09:10 瀏覽:90
jre下載linux 發布:2025-07-02 11:07:43 瀏覽:219
安卓手機換行如何操作 發布:2025-07-02 11:03:12 瀏覽:547
玩客雲伺服器搭建 發布:2025-07-02 10:59:58 瀏覽:357
假笑資料庫 發布:2025-07-02 10:59:09 瀏覽:850
手機怎麼製作腳本 發布:2025-07-02 10:59:05 瀏覽:366
mybatis的動態sql語句 發布:2025-07-02 10:56:51 瀏覽:958