Android 分享邀請卡

2021-08-03 02:07:52 字數 1051 閱讀 3234

//將布局轉換為view型別物件

/* view view = getlayoutinflater().inflate(r.layout.image_share_layout, null);

textview tv_text = (textview) view.findviewbyid(r.id.tv_text);

tv_text.settext("友盟的分享哦哦哦");*/

//開啟影象快取

rl_card.setdrawingcacheenabled(true);

//測量view大小

/* rl_card.measure(view.measurespec.makemeasurespec(0, view.measurespec.unspecified),

view.measurespec.makemeasurespec(0, view.measurespec.unspecified));

// 傳送位置和尺寸到view及其所有的子view

rl_card.layout(0, 0, rl_card.getmeasuredwidth(), rl_card.getmeasuredheight());*/

bitmap bitmapss = rl_card.getdrawingcache();

umimage imagesss = new umimage(invitecardactivity.this, bitmapss);//bitmap檔案

new shareaction(invitecardactivity.this)

.setplatform(share_media.qq)

.setcallback(umsharelistener)

.withmedia(imagesss)

.share();

這裡我用的layout就是activity裡面的,當然,也可以自己建立乙個layout,方式就需要inflate一下,將上面**的注釋開啟嘗試一下就行了。分享邀請卡,不要忘繪畫布局上面走,這樣只會越來越繁瑣。希望這個方法對大家有幫助。

微信邀請卡的開發

1 3 wechat php test4 56 define your token 7define token weixin 8 wechatobj new wechatcallbackapitest 9 驗證伺服器和公眾平台是否連線成功 10 在伺服器和公眾平台驗證成功之後,把 wechatobj...

Android技術分享

android開發必看知識,不看後悔 打包為大家奉上最實用最給力的資源,不看你絕對後悔。最強大的ui特效 奇藝高畫質ui 介面源 搜尋關鍵字飛入飛出效果 水波紋效果,附工程原始碼 效果很好很逼真 特效!超牛x launcher特效 仿360 一鍵優化動畫效果 功能強大的拼圖人生原始碼 最火爆的精品例...

Android分享介紹

一.使用系統分享 public void execshare activity context,string title,string text 二.使用第三方sdk分享 1.sharesdk 官網 以上兩種都是比較快的,使用系統分享,不能統計分享流量 使用第三方的分享儘管高速,可是有時候自己定義方...