X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2FDictionaryActivity.java;h=02286155532c187bf366a1cf86ffcdec1e034db6;hb=e79165503392ed6a7cb7a8eadc15eaae0cda9443;hp=a55bc9914a9dd0d6d755b0baadb130584d73df8b;hpb=1aa504ce21ffacbc661330fbb5ed3db0e696b6aa;p=Dictionary.git diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index a55bc99..0228615 100644 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -846,7 +846,7 @@ public class DictionaryActivity extends AppCompatActivity { final LinearLayout result = new LinearLayout(parent.getContext()); - for (int i = 0; dictionaryInfo.indexInfos != null && i < dictionaryInfo.indexInfos.size(); ++i) { + for (int i = 0; i < dictionaryInfo.indexInfos.size(); ++i) { final IndexInfo indexInfo = dictionaryInfo.indexInfos.get(i); final View button = IsoUtils.INSTANCE.createButton(parent.getContext(), indexInfo, application.languageButtonPixels); @@ -1633,7 +1633,7 @@ public class DictionaryActivity extends AppCompatActivity { wrapped.setOrientation(LinearLayout.HORIZONTAL); LinearLayout.LayoutParams p1 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, 0); wrapped.addView(bullet, p1); - LinearLayout.LayoutParams p2 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, 1); + LinearLayout.LayoutParams p2 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, 1); wrapped.addView(i == 0 ? col1 : col2, p2); tableRow.addView(wrapped, layoutParams); }