Commit 031e923c authored by Thomas Krex's avatar Thomas Krex
Browse files

index und indexEntry impementiert

indexEntry extends ImageButton

-getScreenshot implementiert --> gibt Bitmap zurück
	-recording.setTime() wird dafür benutzt
	-hat nun auch boolean, ob display aktualisiert wird oder nicht
computeIndex implmentiert

index.readExtensions implementiert---> thumbnails werden noch selber
berrechnet
BufferedImage muss noch in Android implementiert werden
parent 8d28a695
......@@ -24,25 +24,29 @@ public final class R {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int action_settings=0x7f08000b;
public static final int add=0x7f08000a;
public static final int button_save=0x7f080006;
public static final int feedDetailsLv=0x7f080008;
public static final int feed_list=0x7f080007;
public static final int action_settings=0x7f08000e;
public static final int add=0x7f08000d;
public static final int button_save=0x7f080009;
public static final int feedDetailsLv=0x7f08000b;
public static final int feed_list=0x7f08000a;
public static final int feedback_button=0x7f080002;
public static final int indexScrollView=0x7f080004;
public static final int playerView=0x7f080003;
public static final int progressBar=0x7f080009;
public static final int playerView_extended=0x7f080005;
public static final int progressBar=0x7f08000c;
public static final int scrollView1=0x7f080006;
public static final int test_button=0x7f080000;
public static final int tx_name=0x7f080005;
public static final int tx_url=0x7f080004;
public static final int tx_name=0x7f080008;
public static final int tx_url=0x7f080007;
public static final int watch_button=0x7f080001;
}
public static final class layout {
public static final int activity_main=0x7f030000;
public static final int activity_player=0x7f030001;
public static final int dialog_feeds=0x7f030002;
public static final int feed_activity=0x7f030003;
public static final int feed_details_activity=0x7f030004;
public static final int activity_player_extended=0x7f030002;
public static final int dialog_feeds=0x7f030003;
public static final int feed_activity=0x7f030004;
public static final int feed_details_activity=0x7f030005;
}
public static final class menu {
public static final int feed_menu=0x7f070000;
......
<?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="horizontal" >
<ScrollView
android:id="@+id/indexScrollView"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_weight="3" >
</ScrollView>
<ImageView
android:id="@+id/playerView_extended"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/scrollView1"
android:layout_weight="5"
android:scaleType="fitXY"
android:src="@drawable/ic_launcher" />
</LinearLayout>
\ No newline at end of file
......@@ -6,6 +6,7 @@ import java.io.IOException;
import tttclient.services.DownloadService;
import tttclient.ttt.Recording;
import android.app.Activity;
import android.graphics.Color;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
......@@ -13,8 +14,10 @@ import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.MediaController;
import android.widget.MediaController.MediaPlayerControl;
import android.widget.ScrollView;
import com.example.test.R;
......@@ -23,15 +26,20 @@ public class PlayerActivity extends Activity implements MediaPlayerControl {
public String fileName;
public String filePath;
public ImageView imgV;
private ScrollView scrollView;
private Recording recording;
private MediaPlayer audioPlayer;
private MediaController audioController;
private int imgVHeight;
private int imgVWidth;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_player);
imgV = (ImageView) findViewById(R.id.playerView);
setContentView(R.layout.activity_player_extended);
imgV = (ImageView) findViewById(R.id.playerView_extended);
scrollView = (ScrollView) findViewById(R.id.indexScrollView);
fileName = getIntent().getStringExtra(DownloadService.FILE_NAME);
filePath = getIntent().getStringExtra(DownloadService.FILE_PATH);
......@@ -40,11 +48,13 @@ public class PlayerActivity extends Activity implements MediaPlayerControl {
audioPlayer = MediaPlayer.create(this, Uri.fromFile(audioFile));
try {
Log.d("Player", " width: " + imgVWidth + " , height: " + imgVHeight);
Display display = getWindowManager().getDefaultDisplay();
int screenWidth = display.getWidth(); // deprecated
int screenHeight = display.getHeight(); // deprecated
recording = new Recording(tttFile, audioPlayer, imgV, screenWidth,
screenWidth);
recording = new Recording(getApplicationContext(), tttFile,
audioPlayer, imgV, screenWidth, screenHeight);
} catch (IOException e) {
// TODO Auto-generated catch block
......@@ -84,7 +94,12 @@ public class PlayerActivity extends Activity implements MediaPlayerControl {
//
// }
// });
LinearLayout layout = new LinearLayout(getApplicationContext());
layout.setBackgroundColor(Color.MAGENTA);
//
Log.d("Index", " length " + recording.getIndex().size());
layout.addView(recording.getIndex().get(0));
scrollView.addView(layout);
}
@Override
......
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 to comment