注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

沉默蜂B4A安卓编程

国内资料最全的B4A资料库

 
 
 

日志

 
 

功能较完善的分享库  

2015-08-28 08:32:46|  分类: QQ微信分享 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |


This library is written in B4A :)

I hope you like it :)
ahaShare
Methods:
IsInitialized As Boolean
Tests whether the object has been initialized.
Addfile (Directory As String, Filename As String) As String
Adds a file to the Intent
<B>Attention: file.DirAssets and file.dirInternal will <I>NOT></I> work as Directory!!</B>
Addpackagefilter (PackageFilter As String) As String
Adds a packagefilter. Packages with the given names will not be shown in the ContentChooser
Example1: "com.google.android.keep" to hide Google Keep from the choosable Apps
Example2: "synology" hides every Synology-App
Clearfiles As String
Clears all added files
Initialize (Module As Object, EventName As String) As String
Initializes the Library

<B>Normal Library usage:</B>
-----------------------
<code>Dim Share as ahaShare
Share.initialize(me, "Share")
Share.FaceBookAppID = "xxxx"
Share.FaceBookRedirectUri = "http://www.xxxxxx.xxx/"
Share.Share("Test-Subject","Test-Text")</code>

Event Finished will be raised when Sharing is finished:
Sub Share_Finished
..your code here (i.e deleting temp files,...)
End Sub

<B>That's it :)</B>
Sshare (Subject As String, Text As String) As String
Starts the ContentChooser
Properties:
buttonnormalcolor As Int
Color of the unpressed Buttons
Standard: colors.white
buttonpressedcolor As Int
Color of the pressed Button
Standard: Colors.RGB(29,162,235)
cornerradius As Int
Corner radius of the Buttons
facebookappid As String
Your Facebook AppID. Needed for publishing to FaceBook.
Tutorial by NJDude: <link>http://www.basic4ppc.com/forum/basic4android-getting-started-tutorials/17739-tutorial-post-facebook-wall-via-b4a-app.html|http://www.basic4ppc.com/forum/basic4android-getting-started-tutorials/17739-tutorial-post-facebook-wall-via-b4a-app.html</link>
Attention: If not set, FaceBook will not be available to share with
facebookredirecturi As String
Your Facebook RedirectUri. Needed for publishing to FaceBook.
Tutorial by NJDude: <link>http://www.basic4ppc.com/forum/basic4android-getting-started-tutorials/17739-tutorial-post-facebook-wall-via-b4a-app.html|http://www.basic4ppc.com/forum/basic4android-getting-started-tutorials/17739-tutorial-post-facebook-wall-via-b4a-app.html</link>
Attention: If not set, FaceBook will not be available to share with
headerbackcolor As Int
BackColor of the Header
Standard: Colors.Transparent
headertext As String
HeaderText of the ContentChooser
Standard: Choose
headertextcolor As Int
TextColor of the Header
Standard: Colors.RGB(49,182,255)
headertextsize As Int
TextSize of the Header
Standard: 22
intenttype As String
IntentType, for example "text/*" for Text, "image/jpeg" for jpg, "image/png" for png etc..
linecolor As Int
Color of the Seperatorline below the Header
Standard: Colors.RGB(49,182,255)
padding As Int
Padding
Standard: 10dip
panelcolor As Int
Color of the ContentChooser Panel
Standard: Colors.white
sendingtofacebookfinishedstring As String
The String displayed as ToastMessage after Sending to Facebook succeeded
Standard: "Posted to Facebook"
sendingtofacebookstring As String
The String displayed in the ProgressDialog while sending to FaceBook
Standard: "Posting to Facebook..."
shadowcolor As Int
Color of the Background Shadow.
Use colors.rgb(x,x,x) for opaque background, colors.argb(x,x,x,x) for Transparency
Standard: Colors.ARGB(150,0,0,0)
subject As String
Subject (for E-Mail,..) set as android.intent.extra.SUBJECT
text As String
The Message. Set as android.intent.extra.TEXT
textcolor As Int
Textcolor of the Names of the displayed Packages
Standard: Colors.Black
textsize As Int
TextSize of the Names of the displayed Packages.
Standard: 14
AppButtonWidth As Int
Width of the Buttons
Standard: 160dip
AppButtonHeight As Int
Height of the Buttons
Standard: 120dip
AppIconSize As Int
Size of the Images on the Buttons
Standard: 48dip
HeaderHeight As Int
Height of the Header
Standard: 60dip
Generated with Warwounds Library reference generator
---------------
Version 0.6
New: _Finished Event added

Version 0.7
New: Long click on the App-Symbol opens the Android Application Settings for the clicked app (as the original contentchooser
Fixed: Last line of Icons was not displayed. (Thanks to derez!!)
Change: More icons are displayed at once (Height of the Buttons reduced)

Version 0.8
New: 
AppButtonWidth: sets the width of the Buttons
AppButtonHeight: sets the height of the Buttons
AppIconSize: Sets width & height of the AppIcons
HeaderHeight: Sets the height of the Header 
Fixed: Error handling in all Subs

Version 1.0
Beta finished :)
SourceCode attached
  评论这张
 
阅读(118)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017