summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml5
-rw-r--r--ic_launcher-web.pngbin0 -> 72979 bytes
-rw-r--r--res/drawable-hdpi/ic_launcher.pngbin4147 -> 5114 bytes
-rw-r--r--res/drawable-ldpi/ic_launcher.pngbin1723 -> 2128 bytes
-rw-r--r--res/drawable-mdpi/ic_launcher.pngbin2574 -> 3062 bytes
-rw-r--r--res/drawable-xhdpi/ic_launcher.pngbin0 -> 7338 bytes
-rw-r--r--res/layout/feedinfo.xml56
-rw-r--r--res/values/colors.xml1
-rw-r--r--src/de/podfetcher/activity/FeedInfoActivity.java63
-rw-r--r--src/de/podfetcher/util/FeedMenuHandler.java6
10 files changed, 129 insertions, 2 deletions
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">
<activity
android:label="@string/app_name"
android:name="de.podfetcher.activity.PodfetcherActivity" android:theme="@style/StyledIndicators">
@@ -41,6 +41,7 @@
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON"/>
</intent-filter>
- </receiver>
+ </receiver>
+ <activity android:name=".activity.FeedInfoActivity"></activity>
</application>
</manifest>
diff --git a/ic_launcher-web.png b/ic_launcher-web.png
new file mode 100644
index 000000000..3aee8d170
--- /dev/null
+++ b/ic_launcher-web.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png
index 8074c4c57..c3499b991 100644
--- a/res/drawable-hdpi/ic_launcher.png
+++ b/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/res/drawable-ldpi/ic_launcher.png b/res/drawable-ldpi/ic_launcher.png
index 1095584ec..e702298d0 100644
--- a/res/drawable-ldpi/ic_launcher.png
+++ b/res/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png
index a07c69fa5..12ac3e499 100644
--- a/res/drawable-mdpi/ic_launcher.png
+++ b/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher.png b/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..532ca2cf3
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher.png
Binary files 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <RelativeLayout
+ android:id="@+id/header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical" >
+
+ <ImageView
+ android:id="@+id/imgvCover"
+ android:layout_width="70dp"
+ android:layout_height="70dp"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:layout_margin="4dp" />
+
+ <TextView
+ android:id="@+id/txtvTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_margin="4dp"
+ android:layout_toRightOf="@id/imgvCover"
+ android:textSize="20dp"
+ android:textStyle="bold" />
+
+ <View
+ android:id="@+id/divider"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_below="@id/imgvCover"
+ android:background="@color/bright_blue" />
+ </RelativeLayout>
+
+ <ScrollView
+ android:id="@+id/scrollView"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <TextView
+ android:id="@+id/txtvDescription"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+ </ScrollView>
+
+</LinearLayout> \ 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 @@
<color name="blue">#0000FF</color>
<color name="navy">#000080</color>
<color name="black">#000000</color>
+ <color name="bright_blue">#33B5E5</color>
</resources> \ 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;