Back to project page android-socialbuttons.
The source code is released under:
Apache License
If you think the Android project android-socialbuttons listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package it.gcacace.android.socialbuttons.demo; // www . j av a 2 s. com import android.app.Activity; import android.os.Bundle; import it.gcacace.android.socialbuttons.TwitterSharesButton; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Find the second SharesButton from the inflated layout TwitterSharesButton sharesButton = (TwitterSharesButton) findViewById(R.id.sharesButton2); // Set sharesUrl to an URL sharesButton.setSharesUrl("http://mobile.fanpage.it/segui-la-diretta-del-google-i-o-2103/"); // Set annotation to show a shares count bubble sharesButton.setAnnotation(TwitterSharesButton.ANNOTATION_BUBBLE); // Fetch the shares count (this call is asynchronous) sharesButton.fetchShares(); } }