diff options
Diffstat (limited to 'app/src/main/java/net/lacolaco/smileessence/view')
4 files changed, 2 insertions, 7 deletions
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/MentionsFragment.java b/app/src/main/java/net/lacolaco/smileessence/view/MentionsFragment.java index ccdb5f28..9bce0f77 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/MentionsFragment.java +++ b/app/src/main/java/net/lacolaco/smileessence/view/MentionsFragment.java @@ -29,7 +29,6 @@ import android.widget.ListView; import com.handmark.pulltorefresh.library.PullToRefreshBase; import net.lacolaco.smileessence.Application; import net.lacolaco.smileessence.R; -import net.lacolaco.smileessence.activity.MainActivity; import net.lacolaco.smileessence.entity.Account; import net.lacolaco.smileessence.entity.ExtractionWord; import net.lacolaco.smileessence.entity.Tweet; @@ -108,7 +107,6 @@ public class MentionsFragment extends CustomListFragment<StatusListAdapter> { @Override public void onPullUpToRefresh(final PullToRefreshBase<ListView> refreshView) { - final MainActivity activity = (MainActivity) getActivity(); final Account currentAccount = Application.getCurrentAccount(); final StatusListAdapter adapter = getAdapter(); new MentionsTimelineTask(currentAccount) diff --git a/app/src/main/java/net/lacolaco/smileessence/view/SearchFragment.java b/app/src/main/java/net/lacolaco/smileessence/view/SearchFragment.java index 1bd03c73..27818363 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/SearchFragment.java +++ b/app/src/main/java/net/lacolaco/smileessence/view/SearchFragment.java @@ -83,7 +83,6 @@ public class SearchFragment extends CustomListFragment<SearchListAdapter> implem SearchListAdapter adapter = new SearchListAdapter(getActivity()); setAdapter(adapter); - final MainActivity activity = (MainActivity) getActivity(); String lastUsedSearchQuery = InternalPreferenceHelper.getInstance().get(R.string.key_last_used_search_query, ""); if (!TextUtils.isEmpty(lastUsedSearchQuery)) { startSearch(lastUsedSearchQuery); @@ -131,7 +130,6 @@ public class SearchFragment extends CustomListFragment<SearchListAdapter> implem @Override public void onPullDownToRefresh(final PullToRefreshBase<ListView> refreshView) { - final MainActivity activity = (MainActivity) getActivity(); final Account currentAccount = Application.getCurrentAccount(); final SearchListAdapter adapter = getAdapter(); String queryString = adapter.getQuery(); @@ -172,7 +170,6 @@ public class SearchFragment extends CustomListFragment<SearchListAdapter> implem @Override public void onPullUpToRefresh(final PullToRefreshBase<ListView> refreshView) { - final MainActivity activity = (MainActivity) getActivity(); final Account currentAccount = Application.getCurrentAccount(); final SearchListAdapter adapter = getAdapter(); String queryString = adapter.getQuery(); diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.java index 4fa2a8d2..8a31605c 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.java +++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.java @@ -141,7 +141,7 @@ public class PageListAdapter extends FragmentPagerAdapter implements ViewPager.O return -1; } - @Deprecated + @Deprecated @SuppressWarnings("unchecked") public <T extends PageFragment> T getFragment(Class<T> fragmentClass) { for(PageInfo info : pages) { if (info.getFragmentClass() == fragmentClass) { diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/SelectSearchQueryDialogFragment.java b/app/src/main/java/net/lacolaco/smileessence/view/dialog/SelectSearchQueryDialogFragment.java index 24bec636..fa5d3218 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/SelectSearchQueryDialogFragment.java +++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/SelectSearchQueryDialogFragment.java @@ -49,7 +49,7 @@ public class SelectSearchQueryDialogFragment extends MenuDialogFragment implemen @Override public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { final CommandOpenSearch command = (CommandOpenSearch) parent.getItemAtPosition(position); - final CustomListAdapter<Command> adapter = (CustomListAdapter<Command>) parent.getAdapter(); + @SuppressWarnings("unchecked") final CustomListAdapter<Command> adapter = (CustomListAdapter<Command>) parent.getAdapter(); ConfirmDialogFragment.show(getActivity(), getString(R.string.dialog_confirm_delete_query), () -> { adapter.removeItem(command); |