mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
fix crash on old device by using new API conditionally
This commit is contained in:
parent
88d8e61620
commit
68df61daa8
1 changed files with 13 additions and 9 deletions
|
@ -86,14 +86,18 @@ public class ChatDelegate extends DelegateBase {
|
||||||
|
|
||||||
m_scroll = (ScrollView)findViewById( R.id.scroll );
|
m_scroll = (ScrollView)findViewById( R.id.scroll );
|
||||||
m_layout = (TableLayout)findViewById( R.id.chat_history );
|
m_layout = (TableLayout)findViewById( R.id.chat_history );
|
||||||
m_layout.addOnLayoutChangeListener( new OnLayoutChangeListener() {
|
|
||||||
@Override
|
// OnLayoutChangeListener added in API 11
|
||||||
public void onLayoutChange( View vv, int ll, int tt, int rr,
|
if ( 11 <= Integer.valueOf( android.os.Build.VERSION.SDK ) ) {
|
||||||
int bb, int ol, int ot,
|
m_layout.addOnLayoutChangeListener( new OnLayoutChangeListener() {
|
||||||
int or, int ob ) {
|
@Override
|
||||||
scrollDown();
|
public void onLayoutChange( View vv, int ll, int tt, int rr,
|
||||||
}
|
int bb, int ol, int ot,
|
||||||
});
|
int or, int ob ) {
|
||||||
|
scrollDown();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
DBUtils.HistoryPair[] pairs
|
DBUtils.HistoryPair[] pairs
|
||||||
= DBUtils.getChatHistory( m_activity, m_rowid, locals );
|
= DBUtils.getChatHistory( m_activity, m_rowid, locals );
|
||||||
|
@ -110,7 +114,7 @@ public class ChatDelegate extends DelegateBase {
|
||||||
// Should really assert....
|
// Should really assert....
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
} // init
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume()
|
protected void onResume()
|
||||||
|
|
Loading…
Reference in a new issue