Code example for View

Methods: getTag

0
 * in the browser application. 
 */ 
public class UrlIntentListener implements OnItemClickListener {
 
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        final String url = view.getTag().toString();
        final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        final Context context = parent.getContext();
        context.startActivity(intent);
    } 
 
}