The following document contains the results of PMD's CPD 4.2.2.
File | Line |
---|---|
sk/baka/aedict/KanjiAnalyzeActivity.java | 188 |
sk/baka/aedict/TanakaAnalyzeActivity.java | 97 |
sb.insert(0, e.english); ((TextView) v.findViewById(android.R.id.text2)).setText(sb.toString()); final TextView tv = (TextView) v.findViewById(R.id.kanjiBig); // if the japanese word is too big the reading and the // translation is not shown anymore // workaround: add \n character after each third char tv.setText(splitToRows(e.getJapanese())); return v; } private String splitToRows(final String str) { if (str == null) { return ""; } final StringBuilder sb = new StringBuilder(str.length() * 4 / 3); for (int i = 0; i < str.length(); i++) { if ((i > 0) && (i % 3 == 0)) { sb.append('\n'); } sb.append(str.charAt(i)); } return sb.toString(); } }; } @Override protected void onSaveInstanceState(Bundle outState) { |
File | Line |
---|---|
sk/baka/aedict/KanjiAnalyzeActivity.java | 161 |
sk/baka/aedict/TanakaAnalyzeActivity.java | 82 |
setListAdapter(newAdapter()); } private ArrayAdapter<DictEntry> newAdapter() { return new ArrayAdapter<DictEntry>(this, R.layout.kanjidic_list_item, model) { @Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { v = getLayoutInflater().inflate(R.layout.kanjidic_list_item, getListView(), false); } final DictEntry e = model.get(position); ((TextView) v.findViewById(android.R.id.text1)).setText(showRomaji.romanize(e.reading)); final StringBuilder sb = new StringBuilder(); |