Java Code Examples for com.pluscubed.logcat.util.StringUtil#split()

The following examples show how to use com.pluscubed.logcat.util.StringUtil#split() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SettingsActivity.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
private void setBufferPreferenceSummary(String value) {

            String[] commaSeparated = StringUtil.split(StringUtil.nullToEmpty(value), MultipleChoicePreference.DELIMITER);

            List<CharSequence> checkedEntries = new ArrayList<CharSequence>();

            for (String entryValue : commaSeparated) {
                int idx = ArrayUtil.indexOf(bufferPreference.getEntryValues(), entryValue);
                checkedEntries.add(bufferPreference.getEntries()[idx]);
            }

            String summary = TextUtils.join(getString(R.string.delimiter), checkedEntries);

            // add the word "simultaneous" to make it clearer what's going on with 2+ buffers
            if (checkedEntries.size() > 1) {
                summary += getString(R.string.simultaneous);
            }
            bufferPreference.setSummary(summary);
        }
 
Example 2
Source File: SettingsActivity.java    From javaide with GNU General Public License v3.0 6 votes vote down vote up
private void setBufferPreferenceSummary(String value) {

            String[] commaSeparated = StringUtil.split(StringUtil.nullToEmpty(value), MultipleChoicePreference.DELIMITER);

            List<CharSequence> checkedEntries = new ArrayList<CharSequence>();

            for (String entryValue : commaSeparated) {
                int idx = ArrayUtil.indexOf(bufferPreference.getEntryValues(), entryValue);
                checkedEntries.add(bufferPreference.getEntries()[idx]);
            }

            String summary = TextUtils.join(getString(R.string.delimiter), checkedEntries);

            // add the word "simultaneous" to make it clearer what's going on with 2+ buffers
            if (checkedEntries.size() > 1) {
                summary += getString(R.string.simultaneous);
            }
            bufferPreference.setSummary(summary);
        }
 
Example 3
Source File: SettingsActivity.java    From matlog with GNU General Public License v3.0 6 votes vote down vote up
private void setBufferPreferenceSummary(String value) {

            String[] commaSeparated = StringUtil.split(StringUtil.nullToEmpty(value), MultipleChoicePreference.DELIMITER);

            List<CharSequence> checkedEntries = new ArrayList<>();

            for (String entryValue : commaSeparated) {
                int idx = ArrayUtil.indexOf(bufferPreference.getEntryValues(), entryValue);
                checkedEntries.add(bufferPreference.getEntries()[idx]);
            }

            String summary = TextUtils.join(getString(R.string.delimiter), checkedEntries);

            // add the word "simultaneous" to make it clearer what's going on with 2+ buffers
            if (checkedEntries.size() > 1) {
                summary += getString(R.string.simultaneous);
            }
            bufferPreference.setSummary(summary);
        }