Commit e9f664f0 authored by Grigory Fedorov's avatar Grigory Fedorov

"Clear status history" hided on some devices fixed - important to add listview adapter after footer

parent 156340e1
......@@ -101,12 +101,13 @@ public class StatusEditor extends ManagedListActivity implements OnItemClickList
listView.setOnItemClickListener(this);
registerForContextMenu(listView);
adapter = new StatusEditorAdapter(this);
setListAdapter(adapter);
View footerView = ((LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.status_history_footer, null, false);
footerView.findViewById(R.id.clear_status_history_button).setOnClickListener(this);
listView.addFooterView(footerView);
setListAdapter(adapter);
statusTextView = (EditText) findViewById(R.id.status_text);
statusModeView = (Spinner) findViewById(R.id.status_icon);
statusModeView.setAdapter(new StatusModeAdapter(this));
......@@ -191,10 +192,6 @@ public class StatusEditor extends ManagedListActivity implements OnItemClickList
case R.id.action_change_status:
changeStatus();
return true;
case R.id.action_clear_status_history:
clearStatusHistory();
return true;
}
return false;
}
......
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_clear_status_history"
android:title="@string/clear_status_history"
app:showAsAction="always"
android:orderInCategory="90"
/>
</menu>
\ No newline at end of file
......@@ -20,8 +20,8 @@
<!--for text selection toolbar to be above usual toolbar -->
<item name="windowActionModeOverlay">true</item>
<!-- for hardware button menu -->
<item name="panelBackground">?attr/colorPrimary</item>
<!--&lt;!&ndash; for hardware button menu &ndash;&gt;-->
<!--<item name="panelBackground">?attr/colorPrimary</item>-->
</style>
<style name="ToolbarTitle" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Title">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment