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 ...@@ -101,12 +101,13 @@ public class StatusEditor extends ManagedListActivity implements OnItemClickList
listView.setOnItemClickListener(this); listView.setOnItemClickListener(this);
registerForContextMenu(listView); registerForContextMenu(listView);
adapter = new StatusEditorAdapter(this); adapter = new StatusEditorAdapter(this);
setListAdapter(adapter);
View footerView = ((LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.status_history_footer, null, false); 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); footerView.findViewById(R.id.clear_status_history_button).setOnClickListener(this);
listView.addFooterView(footerView); listView.addFooterView(footerView);
setListAdapter(adapter);
statusTextView = (EditText) findViewById(R.id.status_text); statusTextView = (EditText) findViewById(R.id.status_text);
statusModeView = (Spinner) findViewById(R.id.status_icon); statusModeView = (Spinner) findViewById(R.id.status_icon);
statusModeView.setAdapter(new StatusModeAdapter(this)); statusModeView.setAdapter(new StatusModeAdapter(this));
...@@ -191,10 +192,6 @@ public class StatusEditor extends ManagedListActivity implements OnItemClickList ...@@ -191,10 +192,6 @@ public class StatusEditor extends ManagedListActivity implements OnItemClickList
case R.id.action_change_status: case R.id.action_change_status:
changeStatus(); changeStatus();
return true; return true;
case R.id.action_clear_status_history:
clearStatusHistory();
return true;
} }
return false; 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 @@ ...@@ -20,8 +20,8 @@
<!--for text selection toolbar to be above usual toolbar --> <!--for text selection toolbar to be above usual toolbar -->
<item name="windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<!-- for hardware button menu --> <!--&lt;!&ndash; for hardware button menu &ndash;&gt;-->
<item name="panelBackground">?attr/colorPrimary</item> <!--<item name="panelBackground">?attr/colorPrimary</item>-->
</style> </style>
<style name="ToolbarTitle" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"> <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