模仿iOS版微信的滑動View

2021-09-24 08:25:44 字數 1358 閱讀 8235

最近幾個月終於有大把時間總結這兩年來所學 2019.5.23

github位址

---------------------------------我是分割線---------------------------------

1.1 內容展示

1.2 功能介紹

在activity裡面

slideview = findviewbyid(r.id.slide_view1);

slideview.setonclicklistener(new listener.onmenuclicklistener

() }

});複製**

在xml裡面

"@+id/slide_view1"

......

複製**

從xml檔案裡面,細心一點兒可以看出我對slideview的內容分成了 image title message menu_a menu_b 五個部分。對應到view裡面,看下面的圖示:

下面分別介紹一下五個部分。

2.1 image

image 表示使用者頭像,裡面有三個配置引數

複製**

image_src:檔案資源

image_margin_start:的start位置到view最左側的偏移量

image_slide_length:的邊長「正方形」

2.2 title

複製**

title_text:文字內容

title_text_size:文字大小

title_text_color:文字顏色

title_text_margin_start:文字起始位置的偏移量

2.3 message

複製**

message_text:文字內容

message_text_size:文字大小

message_text_color:文字顏色

message_text_margin_start:文字起始位置的偏移量

2.4 menu

menu_a 和menu_b的內容是一樣的,所以這裡放在一起統一講

複製**

slideview github詳細位址

模仿iOS版微信的滑動View

最近幾個月終於有大把時間總結這兩年來所學 2019.5.23 我是分割線 1.1 內容展示 1.2 功能介紹 在activity裡面 slideview findviewbyid r.id.slide view1 slideview.setonclicklistener new listener.o...

ionic 微信分享之IOS版

作者在安裝方法中提到 add wechat lib to your project.don t forget to add the url type 由於對ios的配置環境不太了解,查了資料以後才知道,我們需要做的,如下 2 找到你的專案中字尾名為plist的檔案 可能具體的檔名會因專案不一樣 在下...

模仿微信6 0的介面效果

實現目標 首先自定義屬性 hello world settings 查詢 新增 發起群聊 新增朋友 掃一掃意見反饋 通訊錄發現 我 android id id action search android icon drawable ic launcher android actionviewclas...