mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix NPE introduced by Ia0dc487c
Bug: 4553273 Change-Id: Iaf7a969b2c96750070a296791108d67887d613e4
This commit is contained in:
parent
212ee95dbd
commit
f20eb55d4f
@ -278,7 +278,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
|
||||
setSuggestions(builder.build());
|
||||
mShowingAddToDictionary = true;
|
||||
// Disable R.string.hint_add_to_dictionary button
|
||||
TextView tv = (TextView)getChildAt(1).findViewById(R.id.candidate_word);
|
||||
TextView tv = (TextView)mWords.get(1).findViewById(R.id.candidate_word);
|
||||
tv.setClickable(false);
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
|
||||
previewText.setText(word);
|
||||
previewText.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),
|
||||
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
|
||||
View v = getChildAt(index);
|
||||
View v = mWords.get(index);
|
||||
final int[] offsetInWindow = new int[2];
|
||||
v.getLocationInWindow(offsetInWindow);
|
||||
final int posX = offsetInWindow[0];
|
||||
|
Loading…
Reference in New Issue
Block a user