summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetSearchActivity.java
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2014-05-19 01:05:48 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2014-05-19 01:05:48 +0200
commit1ee50e81ae8a86bcf2348d956f23c84fbce21b14 (patch)
treefd934ea167aaf9ccee4c73186bcaa766f5715e05 /src/de/danoeh/antennapod/activity/gpoddernet/GpodnetSearchActivity.java
parentfe7af4265d8ed83c2efc4da05c23420934814150 (diff)
downloadAntennaPod-1ee50e81ae8a86bcf2348d956f23c84fbce21b14.zip
Removed unused resources, reduced number of lint warnings
Diffstat (limited to 'src/de/danoeh/antennapod/activity/gpoddernet/GpodnetSearchActivity.java')
-rw-r--r--src/de/danoeh/antennapod/activity/gpoddernet/GpodnetSearchActivity.java63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetSearchActivity.java b/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetSearchActivity.java
deleted file mode 100644
index 199b45dc9..000000000
--- a/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetSearchActivity.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package de.danoeh.antennapod.activity.gpoddernet;
-
-import android.app.SearchManager;
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.app.NavUtils;
-import android.view.MenuItem;
-import de.danoeh.antennapod.R;
-import de.danoeh.antennapod.fragment.gpodnet.SearchListFragment;
-import org.apache.commons.lang3.StringUtils;
-
-/**
- * Created by daniel on 23.08.13.
- */
-public class GpodnetSearchActivity extends GpodnetActivity {
-
- private SearchListFragment searchFragment;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- setContentView(R.layout.gpodnet_search);
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- Intent intent = getIntent();
- if (StringUtils.equals(intent.getAction(), Intent.ACTION_SEARCH)) {
- handleSearchRequest(intent.getStringExtra(SearchManager.QUERY));
- }
- }
-
- @Override
- protected void onNewIntent(Intent intent) {
- setIntent(intent);
- }
-
- private void handleSearchRequest(String query) {
- getSupportActionBar().setSubtitle(getString(R.string.search_term_label) + query);
- if (searchFragment == null) {
- FragmentTransaction transaction = getSupportFragmentManager()
- .beginTransaction();
- searchFragment = SearchListFragment.newInstance(query);
- transaction.replace(R.id.searchListFragment, searchFragment);
- transaction.commit();
- } else {
- searchFragment.changeQuery(query);
- }
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- NavUtils.navigateUpFromSameTask(this);
- return true;
- }
- return super.onOptionsItemSelected(item);
- }
-}