Commit 60096c4b by Thomas Krex

actiobar sherlock hinzugefügt -> kompatibel zu android 2.3.3

parent be157c0e
......@@ -13,14 +13,14 @@
</uses-permission>
<uses-sdk
android:minSdkVersion="9"
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ttt24"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.Sherlock" >
<activity
android:name="tttclient.activities.MainActivity"
android:label="@string/app_name" >
......
......@@ -13,14 +13,14 @@
</uses-permission>
<uses-sdk
android:minSdkVersion="9"
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ttt24"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/Theme.Sherlock" >
<activity
android:name="tttclient.activities.MainActivity"
android:label="@string/app_name" >
......
# cache for current jar dependency. DO NOT EDIT.
# format is <lastModified> <length> <SHA-1> <path>
# Encoding is UTF-8
1390577451000 627582 db0f122c99ef9f90dbab3fada6d191f2880cbb8e /Volumes/Macintosh HD/Users/thomaskrex/git/TTTAndroidClient/TTTCLient/libs/android-support-v4.jar
1375081746000 271754 53307dc2bd2b69fd5533458ee11885f55807de4b /Volumes/Macintosh HD/Users/thomaskrex/Downloads/JakeWharton-ActionBarSherlock-5a15d92/actionbarsherlock/libs/android-support-v4.jar

136 Bytes | W: | H:

2.01 KB | W: | H:

TTTCLient/bin/res/crunch/drawable-xxhdpi/ttt24.png
TTTCLient/bin/res/crunch/drawable-xxhdpi/ttt24.png
TTTCLient/bin/res/crunch/drawable-xxhdpi/ttt24.png
TTTCLient/bin/res/crunch/drawable-xxhdpi/ttt24.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -13,3 +13,4 @@
# Project target.
target=android-19
android.library=false
android.library.reference.1=../../../Downloads/JakeWharton-ActionBarSherlock-5a15d92/actionbarsherlock

23.3 KB | W: | H:

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();
......
......@@ -5,8 +5,7 @@ import java.io.IOException;
import tttclient.services.DownloadService;
import tttclient.ttt.Recording;
import android.annotation.TargetApi;
import android.app.Activity;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.media.MediaPlayer;
import android.net.Uri;
......@@ -14,22 +13,27 @@ import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.inputmethod.EditorInfo;
import android.widget.ImageView;
import android.widget.MediaController;
import android.widget.MediaController.MediaPlayerControl;
import android.widget.ScrollView;
import android.widget.SearchView;
import android.widget.SearchView.OnQueryTextListener;
import android.widget.ViewSwitcher;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.widget.SearchView;
import com.actionbarsherlock.widget.SearchView.OnQueryTextListener;
import de.tum.in.tttclient.R;
public class PlayerActivity extends Activity implements MediaPlayerControl {
public class PlayerActivity extends SherlockActivity implements
MediaPlayerControl {
public String fileName;
public String filePath;
......@@ -41,11 +45,11 @@ public class PlayerActivity extends Activity implements MediaPlayerControl {
private MediaController audioController;
private SearchView searchView;
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_player_main);
scrollView = (ScrollView) findViewById(R.id.indexScrollView);
switcher = (ViewSwitcher) findViewById(R.id.viewSwitcher);
......@@ -217,13 +221,17 @@ public class PlayerActivity extends Activity implements MediaPlayerControl {
audioPlayer.release();
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@SuppressLint("NewApi")
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
MenuInflater inflater = getSupportMenuInflater();
inflater.inflate(R.menu.player_menu, menu);
MenuItem item = menu.findItem(R.id.search);
searchView = (SearchView) item.getActionView();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
searchView.setImeOptions(EditorInfo.IME_FLAG_NO_FULLSCREEN
| EditorInfo.IME_ACTION_NEXT);
searchView.setOnQueryTextListener(new OnQueryTextListener() {
@Override
......@@ -235,7 +243,7 @@ public class PlayerActivity extends Activity implements MediaPlayerControl {
@Override
public boolean onQueryTextChange(String newText) {
// search(newText);
search(newText);
return true;
}
});
......
......@@ -27,8 +27,8 @@ package tttclient.messages.annotations;
import java.io.DataInputStream;
import java.io.IOException;
import tttclient.shapes.StrokedPath;
import tttclient.ttt.Constants;
import tttclient.ttt.StrokedPath;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
......
......@@ -27,8 +27,8 @@ package tttclient.messages.annotations;
import java.io.DataInputStream;
import java.io.IOException;
import tttclient.shapes.StrokedRect;
import tttclient.ttt.Constants;
import tttclient.ttt.StrokedRect;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
......
......@@ -113,9 +113,6 @@ public class FeedItemDbManager {
c.close();
}
// c = db.rawQuery("SELECT last_insert_rowid()", null);
// c.moveToNext();
}
public void deleteTable() {
......
......@@ -103,7 +103,6 @@ public class ParseService extends IntentService {
@Override
public void start(Attributes attributes) {
feedItem.setLength(attributes.getValue(LENGTH));
Log.d("Parser", "length: " + attributes.getValue(LENGTH));
}
});
......
......@@ -22,14 +22,14 @@
*
* Author: Peter Ziewer, TU Munich, Germany - ziewer@in.tum.de
*/
package tttclient.ttt;
package tttclient.shapes;
import android.graphics.RectF;
public class ColoredShape {
int color;
RectF rectangle;
boolean filled;
public int color;
public RectF rectangle;
public boolean filled;
public ColoredShape(int color, RectF rectangle, boolean filled) {
this.color = color;
......
package tttclient.ttt;
package tttclient.shapes;
import android.graphics.Canvas;
import android.graphics.Paint.Cap;
......
package tttclient.ttt;
package tttclient.shapes;
import android.graphics.Canvas;
import android.graphics.Paint.Cap;
......
package tttclient.ttt;
package tttclient.shapes;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
......
......@@ -440,7 +440,7 @@ public class Index {
* @return
* @throws IOException
*/
final public static double THUMBNAIL_SCALE_FACTOR = 0.3;
final public static double THUMBNAIL_SCALE_FACTOR = 0.25;
public boolean createScreenshots() throws IOException {
......@@ -695,9 +695,22 @@ public class Index {
if (index.get(i).contains(searchword))
search_index.add(index.get(i));
Log.d("search", "number of hits: " + search_index.size());
highlightSearchResultsOnThumbnails();
// force repaint to highlight results
}
public void nextSearchResult() {
int time = recording.getTime();
for (int i = 0; i < search_index.size(); i++) {
// found - set player to index with next search result
if (search_index.get(i).getTimestamp() > time) {
recording.setTime(search_index.get(i).getTimestamp(), true);
break;
}
// reached end of recording - start from beginning
if (i == search_index.size() - 1)
recording.setTime(search_index.get(0).getTimestamp(), true);
}
}
......
......@@ -6,6 +6,7 @@ import java.util.ArrayList;
import tttclient.messages.annotations.Annotation;
import tttclient.messages.annotations.HighlightAnnotation;
import tttclient.shapes.ColoredShape;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Bitmap;
......
......@@ -35,8 +35,6 @@ import java.util.zip.InflaterInputStream;
import tttclient.messages.Message;
import tttclient.messages.MessageProducerAdapter;
import tttclient.messages.Messages;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
......@@ -119,6 +117,7 @@ public class Recording extends MessageProducerAdapter implements Runnable {
}
graphicsContext.enableRefresh(true);
setTime(0, true);
messages.statistics();
}
void read(File file) throws IOException {
......@@ -452,13 +451,12 @@ public class Recording extends MessageProducerAdapter implements Runnable {
return layout;
}
@SuppressLint("NewApi")
View addTitle(int number) {
TextView title = new TextView(context);
title.setText(String.valueOf(number + 1));
title.setTextAppearance(context, android.R.style.TextAppearance_Large);
title.setTextColor(Color.BLACK);
title.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
// title.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
return title;
}
......@@ -538,6 +536,7 @@ public class Recording extends MessageProducerAdapter implements Runnable {
// paint offscreen
messages.setTime_full_frame_check(time);
// messages.setTime_full_frame_check_regarding_stripes(time);
if (refresh) {
// focusCurrentIndexEntry(time);
......
......@@ -28,6 +28,7 @@ import java.io.DataInputStream;
import java.io.IOException;
import java.util.ArrayList;
import tttclient.shapes.ColoredShape;
import android.graphics.Color;
import android.graphics.RectF;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment