diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4bc96b417..9007e9234 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -15,7 +15,7 @@ android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/Theme.Sherlock.Light.ForceOverflow" - android:name="de.podfetcher.PodcastApp"> + android:name="de.podfetcher.PodcastApp" android:logo="@drawable/ic_launcher"> @@ -41,6 +41,7 @@ - + + diff --git a/ic_launcher-web.png b/ic_launcher-web.png new file mode 100644 index 000000000..3aee8d170 Binary files /dev/null and b/ic_launcher-web.png differ diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png index 8074c4c57..c3499b991 100644 Binary files a/res/drawable-hdpi/ic_launcher.png and b/res/drawable-hdpi/ic_launcher.png differ diff --git a/res/drawable-ldpi/ic_launcher.png b/res/drawable-ldpi/ic_launcher.png index 1095584ec..e702298d0 100644 Binary files a/res/drawable-ldpi/ic_launcher.png and b/res/drawable-ldpi/ic_launcher.png differ diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png index a07c69fa5..12ac3e499 100644 Binary files a/res/drawable-mdpi/ic_launcher.png and b/res/drawable-mdpi/ic_launcher.png differ diff --git a/res/drawable-xhdpi/ic_launcher.png b/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 000000000..532ca2cf3 Binary files /dev/null and b/res/drawable-xhdpi/ic_launcher.png differ diff --git a/res/layout/feedinfo.xml b/res/layout/feedinfo.xml new file mode 100644 index 000000000..bdc585e58 --- /dev/null +++ b/res/layout/feedinfo.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index 61a13a358..1de0f1d98 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -17,5 +17,6 @@ #0000FF #000080 #000000 + #33B5E5 \ No newline at end of file diff --git a/src/de/podfetcher/activity/FeedInfoActivity.java b/src/de/podfetcher/activity/FeedInfoActivity.java new file mode 100644 index 000000000..0cffc37d5 --- /dev/null +++ b/src/de/podfetcher/activity/FeedInfoActivity.java @@ -0,0 +1,63 @@ +package de.podfetcher.activity; + +import android.os.Bundle; +import android.util.Log; +import android.widget.ImageView; +import android.widget.TextView; + +import com.actionbarsherlock.app.SherlockActivity; +import com.actionbarsherlock.view.Menu; +import com.actionbarsherlock.view.MenuItem; + +import de.podfetcher.R; +import de.podfetcher.feed.Feed; +import de.podfetcher.feed.FeedManager; + +/** Displays information about a feed. */ +public class FeedInfoActivity extends SherlockActivity { + private static final String TAG = "FeedInfoActivity"; + + public static final String EXTRA_FEED_ID = "de.podfetcher.extra.feedId"; + + private ImageView imgvCover; + private TextView txtvTitle; + private TextView txtvDescription; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.feedinfo); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + long feedId = getIntent().getLongExtra(EXTRA_FEED_ID, -1); + FeedManager manager = FeedManager.getInstance(); + Feed feed = manager.getFeed(feedId); + if (feed != null) { + imgvCover = (ImageView) findViewById(R.id.imgvCover); + txtvTitle = (TextView) findViewById(R.id.txtvTitle); + txtvDescription = (TextView) findViewById(R.id.txtvDescription); + + imgvCover.setImageBitmap(feed.getImage().getImageBitmap()); + txtvTitle.setText(feed.getTitle()); + txtvDescription.setText(feed.getDescription()); + } else { + Log.e(TAG, "Activity was started with invalid arguments"); + } + + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + finish(); + return true; + default: + return false; + } + } +} diff --git a/src/de/podfetcher/util/FeedMenuHandler.java b/src/de/podfetcher/util/FeedMenuHandler.java index 3a62215b9..dcf6f3f32 100644 --- a/src/de/podfetcher/util/FeedMenuHandler.java +++ b/src/de/podfetcher/util/FeedMenuHandler.java @@ -10,6 +10,7 @@ import com.actionbarsherlock.view.MenuInflater; import com.actionbarsherlock.view.MenuItem; import de.podfetcher.R; +import de.podfetcher.activity.FeedInfoActivity; import de.podfetcher.feed.Feed; import de.podfetcher.feed.FeedItem; import de.podfetcher.feed.FeedManager; @@ -34,6 +35,11 @@ public class FeedMenuHandler { Feed selectedFeed) { FeedManager manager = FeedManager.getInstance(); switch (item.getItemId()) { + case R.id.show_info_item: + Intent startIntent = new Intent(context, FeedInfoActivity.class); + startIntent.putExtra(FeedInfoActivity.EXTRA_FEED_ID, selectedFeed.getId()); + context.startActivity(startIntent); + break; case R.id.mark_all_read_item: manager.markFeedRead(context, selectedFeed); break;