Preference setIntent - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Preference setIntent method.

This code example shows how to use the following methods:setIcon, setIntent, setPersistent, setTitle
    * @param iIconResId 
    */ 
    @SuppressLint("NewApi") 
    private void addFilePreference(File iFile, PreferenceGroup oGroup, int iIconResId)
    { 
        Preference aPref = new Preference(_context);
        aPref.setPersistent(false);
        aPref.setTitle(iFile.getName());
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
            aPref.setIcon(iIconResId);
        // Use an intent to open with external text editor 
        Intent aIntent = new Intent();
        aIntent.setAction(android.content.Intent.ACTION_VIEW);
        aIntent.setDataAndType(Uri.fromFile(iFile), "text/plain");
        aPref.setIntent(aIntent);
         
        oGroup.addPreference(aPref);
    } 
     
   /** 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getText, setIntent, setOnPreferenceClickListener, setSummary
		super.onResume(); 
		// register pref change listener 
		getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
		 
		//TODO updatePreferences() containing following and others 
		pEtFolder.setSummary(pEtFolder.getText());
		setFolderPreferenceClickIntent(); 
		updateIntervalSummary(); 
		updateIntervalTypesEnabled(); 
		updatePTpDailyTime(); 
	} 
 
	// release the sharedPreferenceListener 
	@Override 
	protected void onPause() 
	{ 
		super.onPause(); 
		getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
	} 
	 

5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getSummary, setIntent, setSummary
		//getPreferenceScreen().removePreference(debugScreen); 
	} 
	 
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		pushId.setSummary(getRegistrationId());
		if(pushId.getSummary()==null || pushId.getSummary().length()==0) {
			 
		} else { 
			pushId.setIntent(Intent.createChooser(new Intent(Intent.ACTION_SEND).setType("text/plain").putExtra(Intent.EXTRA_TEXT,pushId.getSummary().toString()), "Share"));
		} 
	}; 
	 
	BroadcastReceiver packageInstalledReceiver;
	 
	@Override 
	public void onDestroy() { 
		super.onDestroy(); 
		if(packageInstalledReceiver!=null) {
			getActivity().unregisterReceiver(packageInstalledReceiver);
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setIntent, setSummary, setTitle
 
	private Preference getPreferenceFromUrlExtra(String extra, int titleResId,
			int summaryResId) {
		String url = this.getIntent().getStringExtra(extra);
		if (url != null) {
			Preference preference = new Preference(this);
			preference.setTitle(titleResId);
			preference.setSummary(summaryResId);
			preference
					.setIntent(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
			return preference;
		} else 
			return null; 
	} 
 
	private Preference getPreferenceMarket(String extra, int titleResId,
			int summaryResId) {
		String flag = this.getIntent().getStringExtra(extra);
		if (flag != null && flag.equalsIgnoreCase("TRUE")) {
			Preference preference = new Preference(this);
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Preference setIntent Questions & Answers:

setIntent Method Overview
Sets an Intent to be used for startActivity(Intent) when this Preference is clicked.
See Code Examples for other Android Preference Methods: