Preference getSummary - 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 getSummary method.

This code example shows how to use the following methods:getSummary, getTitle
		mContext = context;
	} 
	 
	@Override 
	public boolean onPreferenceClick(Preference v) {
 		Log.d(TAG, v.getSummary().toString()  );
 		Log.d(TAG, v.getTitle().toString()  );
		//Gmail intent to reply to the dev 
	return true; 
	} 
	 
	 
    private void log(String message){		   
        if(DBG)Log.d(TAG, message);		  
	} 
}   
6
CodeRank
This code example shows how to use the following methods:getSummary, setSummary
 
 
 
  private static void fillInValue(Preference pref, String value)
  { 
    String summary = pref.getSummary().toString();
    int idx = summary.lastIndexOf('=');
    if (idx != -1) {
      summary = summary.substring(0,idx+1).concat( " "+value );
    } 
    pref.setSummary(summary);
  } 
} 
6
CodeRank
This code example shows how to use the following methods:getSummary, setPersistent
This code example shows how to use the following methods:getSummary, getTitle, setSummary, setTitle
This code example shows how to use the following methods:getSummary, setPersistent
    }; 
 
    public WifiEnabler(Context context, CheckBoxPreference checkBox) {
        mContext = context;
        mCheckBox = checkBox;
        mOriginalSummary = checkBox.getSummary();
        checkBox.setPersistent(false);
 
        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
        mIntentFilter = new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION);
        // The order matters! We really should not depend on this. :( 
        mIntentFilter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION);
        mIntentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
    } 
 
    public void resume() { 
        // Wi-Fi state is sticky, so just let the receiver update UI 
        mContext.registerReceiver(mReceiver, mIntentFilter);
        mCheckBox.setOnPreferenceChangeListener(this);
    } 
5
CodeRank
This code example shows how to use the following methods:getSummary
This code example shows how to use the following methods:getEditText, getText, getSummary
This code example shows how to use the following methods:getEditText, getText, getSummary
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
This code example shows how to use the following methods:getText, getSummary
		if (pref instanceof ListPreference) {
			ListPreference listPref = (ListPreference) pref;
			pref.setSummary(listPref.getEntry());
		} else if (pref instanceof EditTextPreference) {			
			EditTextPreference textPref = (EditTextPreference) pref;
			String sum = textPref.getSummary().toString();			
			pref.setSummary(sum.replaceFirst(": .*", ": " + textPref.getText()));
		} 
	} 
	 
 
	/** 
	 * used to change the summary of a preference 
	 */ 
	public void onSharedPreferenceChanged(SharedPreferences sp, String key) {
		Preference pref = findPreference(key);
		this.setSummary(pref);
	} 
 
	/** 
5
CodeRank

Related Preference getSummary Questions & Answers:

getSummary Method Overview
Returns the summary of this Preference.
See Code Examples for other Android Preference Methods: