mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
"add feed" icon at bottom of feed list. (#178)
This commit is contained in:
parent
4b8f2bdd96
commit
e5a6b03a79
3 changed files with 18 additions and 4 deletions
BIN
clients/android/NewsBlur/res/drawable/ic_menu_add.png
Normal file
BIN
clients/android/NewsBlur/res/drawable/ic_menu_add.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 421 B |
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue