bring scan button to StartConversationActivity
This commit is contained in:
parent
3bd42230f2
commit
12031515d1
|
@ -1746,8 +1746,16 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean scrolledToBottom() {
|
private boolean scrolledToBottom() {
|
||||||
final ListView l = this.binding.messagesView;
|
if (this.binding == null) {
|
||||||
return l.getLastVisiblePosition() == l.getAdapter().getCount() -1 && l.getChildAt(l.getChildCount() - 1).getBottom() <= l.getHeight();
|
return false;
|
||||||
|
}
|
||||||
|
final ListView listView = this.binding.messagesView;
|
||||||
|
if (listView.getLastVisiblePosition() == listView.getAdapter().getCount() -1) {
|
||||||
|
final View lastChild = listView.getChildAt(listView.getChildCount() -1);
|
||||||
|
return lastChild != null && lastChild.getBottom() <= listView.getHeight();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processExtras(Bundle extras) {
|
private void processExtras(Bundle extras) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -15,7 +15,8 @@
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_scan_qr_code"
|
android:id="@+id/action_scan_qr_code"
|
||||||
android:title="@string/scan_qr_code"
|
android:title="@string/scan_qr_code"
|
||||||
app:showAsAction="never"/>
|
android:icon="?attr/icon_scan_qr_code"
|
||||||
|
app:showAsAction="always"/>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_hide_offline"
|
android:id="@+id/action_hide_offline"
|
||||||
|
|
Loading…
Reference in New Issue