ad728

Friday, October 20, 2017

AIDE Tutorial - 37.1 Share Action

AIDE Tutorial- 37.1 Share Action

Watch the video below

Java
package com.kcgroup.share;
import android.app.*;
import android.os.*;
import android.view.*;
import android.content.*;
public class MainActivity extends Activity
{ @Override    protected void onCreate(Bundle savedInstanceState)
    { super.onCreate(savedInstanceState);        setContentView(R.layout.main);    }
public void onShare(View v){Intent in=new Intent(Intent.ACTION_SEND); in.setType("text/plain"); in.putExtra(in.EXTRA_TEXT,"www.shyamkumarkc.blogspot.com"); startActivity(in);}}
Main xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical">
    <TextView  android:text="Share This Tutorial anywhere you like"  android:layout_width="wrap_content"        android:layout_height="wrap_content" />
<Button android:text="Share" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="onShare"/>
</LinearLayout>
Related Video:
AIDE Tutorial- 37 Share on Facebook, Messenger and WhatsApp

Share:

0 comments:

Post a Comment

Total Pageviews

Sponsor

Sponsor

ad300

Blog Archive