Commit cac04172 authored by Thomas Krex's avatar Thomas Krex

push vor dem Umzug

parent c19fbf0d
......@@ -14,14 +14,14 @@
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ttt24"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/MyTheme" >
android:theme="@style/Sherlock.__Theme.Light" >
<activity
android:name="tttclient.activities.MainActivity"
android:label="@string/app_name" >
......@@ -60,6 +60,17 @@
android:name="tttclient.activities.PlayerActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="file" />
<data android:host="*" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.ttt" />
</intent-filter>
</activity>
<service android:name="tttclient.services.DownloadService" >
......
......@@ -11,7 +11,6 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-19
target=android-18
android.library=false
android.library.reference.1=../../Downloads/JakeWharton-ActionBarSherlock-5a15d92/actionbarsherlock
android.library.reference.2=../../Arbeit_workspace/DrawerToggleLibrary
android.library.reference.1=../../Arbeit_workspace/DrawerToggleLibrary
<?xml version="1.0" encoding="utf-8"?>
<!--
File created by the Android Action Bar Style Generator
Copyright (C) 2011 The Android Open Source Project
Copyright (C) 2012 readyState Software Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<style name="Theme.Customactionbar" parent="@style/Theme.Sherlock.Light">
<item name="android:actionBarItemBackground">@drawable/selectable_background_customactionbar</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Customactionbar</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Customactionbar</item>
<item name="android:actionDropDownStyle">@style/DropDownNav.Customactionbar</item>
<item name="android:actionBarStyle">@style/ActionBar.Solid.Customactionbar</item>
<item name="android:actionModeBackground">@drawable/cab_background_top_customactionbar</item>
<item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_customactionbar</item>
<item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Customactionbar</item>
</style>
<style name="ActionBar.Solid.Customactionbar" parent="@style/Widget.Sherlock.Light.ActionBar.Solid">
<item name="android:background">@drawable/ab_solid_customactionbar</item>
<item name="android:backgroundStacked">@drawable/ab_stacked_solid_customactionbar</item>
<item name="android:backgroundSplit">@drawable/ab_bottom_solid_customactionbar</item>
<item name="android:progressBarStyle">@style/ProgressBar.Customactionbar</item>
</style>
<style name="ActionBar.Transparent.Customactionbar" parent="@style/Widget.Sherlock.Light.ActionBar">
<item name="android:background">@drawable/ab_transparent_customactionbar</item>
<item name="android:progressBarStyle">@style/ProgressBar.Customactionbar</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Customactionbar.Widget" parent="@style/Theme.Sherlock">
<item name="android:dropDownListViewStyle">@style/DropDownListView.Customactionbar</item>
</style>
</resources>
\ No newline at end of file
......@@ -17,12 +17,4 @@
<item name="android:textColor">#FFFFFF</item>
</style>
<style name="MyTheme" parent="@style/Theme.Sherlock.Light.DarkActionBar">
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyActionBar" parent="@style/Widget.Sherlock.ActionBar">
<item name="android:background">@color/actionbar_blue</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
File created by the Android Action Bar Style Generator
Copyright (C) 2011 The Android Open Source Project
Copyright (C) 2012 readyState Software Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<style name="Theme.Customactionbar" parent="@style/Theme.Sherlock.Light.DarkActionBar">
<item name="actionBarItemBackground">@drawable/selectable_background_customactionbar</item>
<item name="dropDownListViewStyle">@style/DropDownListView.Customactionbar</item>
<item name="actionBarTabStyle">@style/ActionBarTabStyle.Customactionbar</item>
<item name="actionDropDownStyle">@style/DropDownNav.Customactionbar</item>
<item name="actionBarStyle">@style/ActionBar.Solid.Customactionbar</item>
<item name="actionModeBackground">@drawable/cab_background_top_customactionbar</item>
<item name="actionModeSplitBackground">@drawable/cab_background_bottom_customactionbar</item>
<item name="actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Customactionbar</item>
</style>
<style name="ActionBar.Solid.Customactionbar" parent="@style/Widget.Sherlock.Light.ActionBar">
<item name="background">@drawable/ab_solid_customactionbar</item>
<item name="backgroundStacked">@drawable/ab_stacked_solid_customactionbar</item>
<item name="backgroundSplit">@drawable/ab_bottom_solid_customactionbar</item>
<item name="progressBarStyle">@style/ProgressBar.Customactionbar</item>
</style>
<style name="ActionBar.Transparent.Customactionbar" parent="@style/Widget.Sherlock.Light.ActionBar">
<item name="background">@drawable/ab_transparent_customactionbar</item>
<item name="progressBarStyle">@style/ProgressBar.Customactionbar</item>
</style>
<style name="DropDownListView.Customactionbar" parent="@style/Widget.Sherlock.Light.ListView.DropDown">
<item name="android:listSelector">@drawable/selectable_background_customactionbar</item>
</style>
<style name="ActionBarTabStyle.Customactionbar" parent="@style/Widget.Sherlock.Light.ActionBar.TabView">
<item name="android:background">@drawable/tab_indicator_ab_customactionbar</item>
</style>
<style name="DropDownNav.Customactionbar" parent="@style/Widget.Sherlock.Light.Spinner.DropDown.ActionBar">
<item name="android:background">@drawable/spinner_background_ab_customactionbar</item>
<item name="android:popupBackground">@drawable/menu_dropdown_panel_customactionbar</item>
<item name="android:dropDownSelector">@drawable/selectable_background_customactionbar</item>
</style>
<style name="ProgressBar.Customactionbar" parent="@style/Widget.Sherlock.Light.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_customactionbar</item>
</style>
<style name="ActionButton.CloseMode.Customactionbar" parent="@style/Widget.Sherlock.Light.ActionButton.CloseMode">
<item name="android:background">@drawable/btn_cab_done_customactionbar</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Customactionbar.Widget" parent="@style/Theme.Sherlock">
<item name="dropDownListViewStyle">@style/DropDownListView.Customactionbar</item>
</style>
</resources>
\ No newline at end of file
......@@ -5,7 +5,9 @@ import java.io.IOException;
import tttclient.core.Recording;
import tttclient.services.DownloadService;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.res.Configuration;
import android.media.MediaPlayer;
import android.net.Uri;
......@@ -14,6 +16,7 @@ import android.os.Build;
import android.os.Bundle;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.DrawerLayout.DrawerListener;
import android.util.Log;
import android.view.ContextThemeWrapper;
import android.view.MotionEvent;
import android.view.SurfaceView;
......@@ -166,15 +169,38 @@ public class PlayerActivity extends SherlockFragmentActivity implements
@Override
protected void onPreExecute() {
super.onPreExecute();
fileName = getIntent()
.getStringExtra(DownloadService.FILE_NAME);
setTitle(fileName);
filePath = getIntent()
.getStringExtra(DownloadService.FILE_PATH);
Intent intent = getIntent();
String action = intent.getAction();
if (Intent.ACTION_VIEW.equals(action)) {
String path = intent.getData().getPath();
int indexSlash = path.lastIndexOf("/");
int indexPoint = path.lastIndexOf(".");
fileName = path.substring(indexSlash + 1, indexPoint);
filePath = path.substring(0, indexSlash);
Log.d("Intent", "" + fileName + " , " + filePath);
} else {
fileName = intent.getStringExtra(DownloadService.FILE_NAME);
filePath = getIntent().getStringExtra(
DownloadService.FILE_PATH);
}
File dir = new File(filePath);
setTitle(fileName);
tttFile = new File(filePath + "/" + fileName + ".ttt");
audioFile = new File(filePath + "/" + fileName + ".mp3");
if (!audioFile.exists()) {
audioFile = new File(filePath + "/" + fileName + ".wav");
if (!audioFile.exists()) {
Log.e("Audio File", "not found");
}
}
// audioPlayer for controlling mp3-file
audioPlayer = MediaPlayer.create(getApplicationContext(),
Uri.fromFile(audioFile));
......@@ -360,6 +386,7 @@ public class PlayerActivity extends SherlockFragmentActivity implements
/*******************************************************************************************************************
* configure Menu in Actionbar *
******************************************************************************************************************/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getSupportMenuInflater();
......@@ -395,8 +422,7 @@ public class PlayerActivity extends SherlockFragmentActivity implements
return true;
}
// boolean isExtendend = false;
@SuppressLint("NewApi")
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
......@@ -405,25 +431,7 @@ public class PlayerActivity extends SherlockFragmentActivity implements
return true;
}
switch (item.getItemId()) {
// handle layout switch
// case R.id.extend:
// if (!isExtendend) {
// // switchLayout(LAYOUT_MODE_EXTENDED);
// // item.setIcon(getResources().getDrawable(
// // R.drawable.ic_action_full_screen));
// scrollView.setVisibility(View.VISIBLE);
// isExtendend = true;
// } else if (isExtendend) {
// // switchLayout(LAYOUT_MODE_FULL);
// // item.setIcon(getResources().getDrawable(
// // R.drawable.ic_action_return_from_full_screen));
// scrollView.setVisibility(View.GONE);
// isExtendend = false;
//
// }
// return true;
// go to next search result
case R.id.next:
if (!searchView.getQuery().toString().isEmpty())
recording.getIndex().nextSearchResult();
......@@ -433,35 +441,6 @@ public class PlayerActivity extends SherlockFragmentActivity implements
}
}
// void switchLayout(int mode) {
//
// // switch to fullscreen
// if (mode == LAYOUT_MODE_FULL) {
// setContentView(R.layout.activity_player_full);
// surfaceView = (SurfaceView) findViewById(R.id.playerView_fullscreen);
// recording.graphicsContext().setHolder(surfaceView.getHolder());
//
// recording.graphicsContext().updateView(true);
//
// // switcher.setDisplayedChild(LAYOUT_MODE_FULL);
//
// }
// // switch to extended View
// if (mode == LAYOUT_MODE_EXTENDED) {
// setContentView(R.layout.activity_player_extended);
// surfaceView = (SurfaceView) findViewById(R.id.playerView_extended);
// recording.graphicsContext().setHolder(surfaceView.getHolder());
//
// recording.graphicsContext().updateView(true);
//
// // switcher.setDisplayedChild(LAYOUT_MODE_EXTENDED);
//
// scrollView.scrollTo(0, recording.getIndex().scrollPos);
//
// }
//
// }
/**
* Scales the Parent Layout of the SurfaceView. The method computes the
* ratio between the actual screen height and the height of the recording.
......
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