"add feed" icon at bottom of feed list. (#178)

This commit is contained in:
dosiecki 2015-08-01 19:54:10 -07:00
parent 4b8f2bdd96
commit e5a6b03a79
3 changed files with 18 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

View file

@ -24,6 +24,15 @@
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true" />
<Button
android:id="@+id/main_add_button"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_margin="5dp"
android:background="@drawable/ic_menu_add"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" />
<!-- A pane that sits behind the feed list, acting as a background, except
when the list is empty, and it shows through as an explainer. -->
<RelativeLayout

View file

@ -184,16 +184,16 @@ public class Main extends NbActivity implements StateChangedListener, SwipeRefre
@Override
public boolean onMenuItemClick(MenuItem item) {
if (item.getItemId() == R.id.menu_profile) {
Intent profileIntent = new Intent(this, Profile.class);
startActivity(profileIntent);
Intent i = new Intent(this, Profile.class);
startActivity(i);
return true;
} else if (item.getItemId() == R.id.menu_refresh) {
NBSyncService.forceFeedsFolders();
triggerSync();
return true;
} else if (item.getItemId() == R.id.menu_add_feed) {
Intent intent = new Intent(this, SearchForFeeds.class);
startActivityForResult(intent, 0);
Intent i = new Intent(this, SearchForFeeds.class);
startActivity(i);
return true;
} else if (item.getItemId() == R.id.menu_logout) {
DialogFragment newFragment = new LogoutDialogFragment();
@ -219,6 +219,11 @@ public class Main extends NbActivity implements StateChangedListener, SwipeRefre
return false;
}
@OnClick(R.id.main_add_button) void onClickAddButton() {
Intent i = new Intent(this, SearchForFeeds.class);
startActivity(i);
}
@Override
public void onScrollStateChanged(AbsListView absListView, int i) {
// not required