Code example for Fragment

Methods: getActivitystartActivity

0
    public void displayAvatar() { 
    	((ImageView) getView().findViewById(R.id.profile_picture)).setImageDrawable(avatar);
    } 
     
    public void callOffice() { 
    	Analytics.legislatorCall(getActivity(), legislator.bioguide_id);
    	startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel://" + legislator.phone)));
    } 
     
    public void visitWebsite() { 
    	Analytics.legislatorWebsite(getActivity(), legislator.bioguide_id);
    	startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(legislator.website)));
    } 
     
    public void votingRecord() { 
    	startActivity(new Intent(getActivity(), VoteVoter.class)
			.putExtra("legislator", legislator));
    } 
     
    public void sponsoredBills() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE