Commit 60096c4b authored by Thomas Krex's avatar Thomas Krex
Browse files

actiobar sherlock hinzugefügt -> kompatibel zu android 2.3.3

parent be157c0e
TTTCLient/res/drawable-xxhdpi/ttt24.png

23.3 KB | W: | H:

TTTCLient/res/drawable-xxhdpi/ttt24.png

2.07 KB | W: | H:

TTTCLient/res/drawable-xxhdpi/ttt24.png
TTTCLient/res/drawable-xxhdpi/ttt24.png
TTTCLient/res/drawable-xxhdpi/ttt24.png
TTTCLient/res/drawable-xxhdpi/ttt24.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -3,7 +3,8 @@
<item
android:id="@+id/search"
android:actionViewClass="android.widget.SearchView"
android:actionViewClass="com.actionbarsherlock.widget.SearchView"
android:imeOptions="flagNoFullscreen|flagNavigateNext"
android:showAsAction="always"
android:title="Search"/>
<item
......
......@@ -16,5 +16,7 @@
<string name="inet_needed">Internet Connection needed</string>
<string name="not_found">File was not found</string>
<string name="deleted">File was deleted</string>
<string name="delete_feed">Do you want to delete this feed? All Lectures saved on this devices will be deleted</string>
<string name="delete">Delete</string>
</resources>
\ No newline at end of file
......@@ -3,7 +3,6 @@ package tttclient.activities;
import tttclient.models.Feed;
import tttclient.models.FeedDbManager;
import tttclient.models.FeedItemDbManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
......@@ -12,8 +11,6 @@ import android.database.Cursor;
import android.os.Bundle;
import android.os.Vibrator;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
......@@ -23,10 +20,15 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import de.tum.in.tttclient.R;
public class FeedActivity extends Activity implements OnItemClickListener,
OnItemLongClickListener {
public class FeedActivity extends SherlockActivity implements
OnItemClickListener, OnItemLongClickListener {
private SimpleCursorAdapter adapter;
private String feedUrl;
......@@ -58,7 +60,7 @@ public class FeedActivity extends Activity implements OnItemClickListener,
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.feed_menu, menu);
getSupportMenuInflater().inflate(R.menu.feed_menu, menu);
return true;
}
......@@ -153,9 +155,9 @@ public class FeedActivity extends Activity implements OnItemClickListener,
}
};
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Do you want to delete this feed? All Lectures saved on this devices will be deleted");
builder.setPositiveButton("delete", listener);
builder.setNegativeButton("cancel", null);
builder.setMessage(R.string.delete_feed);
builder.setPositiveButton(R.string.delete, listener);
builder.setNegativeButton(R.string.cancel, null);
builder.show();
return true;
}
......
......@@ -11,7 +11,6 @@ import tttclient.models.FeedItemDbManager;
import tttclient.services.DownloadService;
import tttclient.services.ParseService;
import tttclient.utils.Consts;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
......@@ -35,9 +34,12 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockActivity;
import de.tum.in.tttclient.R;
public class FeedDetailActivity extends Activity implements
public class FeedDetailActivity extends SherlockActivity implements
OnItemClickListener, OnItemLongClickListener {
private static String feedUrl;
......@@ -62,7 +64,6 @@ public class FeedDetailActivity extends Activity implements
Bundle bundle = intent.getExtras();
if (bundle != null) {
String action = intent.getAction();
Log.d("Receiver", "intent received from " + action);
if (action.equals(DownloadService.BROADCAST_NAME)) {
path = bundle.getString(DownloadService.FILE_PATH);
......@@ -279,7 +280,6 @@ public class FeedDetailActivity extends Activity implements
public boolean checkPath(String path, String title) {
File file = new File(path + "/" + title + ".ttt");
Log.d("Path check", path + "/" + title + ".ttt");
return file.exists();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment