Android Open Source - lastUpdates Share Video On Item Click Listener






From Project

Back to project page lastUpdates.

License

The source code is released under:

GNU General Public License

If you think the Android project lastUpdates listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.focusings.focusingsworld.ImageAndTextList;
//from   ww  w  .  jav a 2s  . c  o m
import com.focusings.focusingsworld.R;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;

public class ShareVideoOnItemClickListener implements OnClickListener{

  private String url;
  private String title;
  
    public ShareVideoOnItemClickListener(String url,String title){
        this.url=url;
        this.title=title;
    }

  @Override
  public void onClick(View v) {
    StringBuffer textToSend=new StringBuffer();
    textToSend.append(v.getContext().getResources().getText(R.string.shareVideoRecommendation));
    textToSend.append(" ");
    textToSend.append("\"");
    textToSend.append(title);
    textToSend.append("\"");
    textToSend.append(" - ");
    textToSend.append(url);
        
    Intent sendIntent = new Intent();
    sendIntent.setAction(Intent.ACTION_SEND);
    sendIntent.putExtra(Intent.EXTRA_TEXT, new String(textToSend));
    sendIntent.setType("text/plain");
    v.getContext().startActivity(Intent.createChooser(sendIntent, v.getContext().getResources().getText(R.string.shareVideoVia)));
    
    
    
      //v.getContext().startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse(url)));
  }
  
}




Java Source Code List

com.focusings.focusingsworld.MainActivity.java
com.focusings.focusingsworld.VideoInfo.java
com.focusings.focusingsworld.ImageAndTextList.AsyncImageLoader.java
com.focusings.focusingsworld.ImageAndTextList.ImageAndTextListAdapter.java
com.focusings.focusingsworld.ImageAndTextList.ImageAndText.java
com.focusings.focusingsworld.ImageAndTextList.ShareVideoOnItemClickListener.java
com.focusings.focusingsworld.ImageAndTextList.ViewCache.java
com.focusings.focusingsworld.ImageAndTextList.ViewVideoOnItemClickListener.java
com.focusings.focusingsworld.TwitterParser.AsyncTwitterParser.java
com.focusings.focusingsworld.TwitterParser.TweetInfo.java
com.focusings.focusingsworld.TwitterParser.TweetsListAdapter.java
com.focusings.focusingsworld.TwitterParser.TwitterUtils.java
com.focusings.focusingsworld.YoutubeParser.AsyncYoutubeParser.java
com.focusings.focusingsworld.notificationManagement.AsyncNotificationResponse.java
com.focusings.focusingsworld.notificationManagement.CheckNewUpdatesServiceReceiver.java
com.focusings.focusingsworld.notificationManagement.CheckNewUpdatesService.java
com.focusings.focusingsworld.notificationManagement.Update.java
com.focusings.focusingsworld.pullToRefreshLibrary.PullToRefreshListView.java
com.focusings.focusingsworld.pullToRefreshLibrary.PullToRefreshTwitterOnRefreshListener.java
com.focusings.focusingsworld.pullToRefreshLibrary.PullToRefreshYoutubeOnRefreshListener.java
com.focusings.focusingsworld.shop.GoToStaffWebsiteOnClickListener.java