Code example for Fragment

Methods: getActivity, startActivity

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() { 
    	startActivity(new Intent(getActivity(), BillSponsor.class)