<set> | <set> | ||||
<option value="$PROJECT_DIR$" /> | <option value="$PROJECT_DIR$" /> | ||||
<option value="$PROJECT_DIR$/app" /> | <option value="$PROJECT_DIR$/app" /> | ||||
<option value="$PROJECT_DIR$/openCVLibrary343" /> | |||||
</set> | </set> | ||||
</option> | </option> | ||||
<option name="resolveModulePerSourceSet" value="false" /> | <option name="resolveModulePerSourceSet" value="false" /> |
</value> | </value> | ||||
</option> | </option> | ||||
</component> | </component> | ||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |||||
<output url="file://$PROJECT_DIR$/build/classes" /> | <output url="file://$PROJECT_DIR$/build/classes" /> | ||||
</component> | </component> | ||||
<component name="ProjectType"> | <component name="ProjectType"> |
} | } | ||||
dependencies { | dependencies { | ||||
implementation fileTree(dir: 'libs', include: ['*.jar']) | |||||
implementation fileTree(include: ['*.jar'], dir: 'libs') | |||||
implementation 'com.android.support:appcompat-v7:27.1.1' | implementation 'com.android.support:appcompat-v7:27.1.1' | ||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3' | implementation 'com.android.support.constraint:constraint-layout:1.1.3' | ||||
implementation 'com.android.support:design:27.1.1' | implementation 'com.android.support:design:27.1.1' | ||||
testImplementation 'junit:junit:4.12' | testImplementation 'junit:junit:4.12' | ||||
androidTestImplementation 'com.android.support.test:runner:1.0.2' | androidTestImplementation 'com.android.support.test:runner:1.0.2' | ||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' | ||||
implementation project(':openCVLibrary343') | |||||
} | } |
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||||
package="project.schafkopfzaehler_2"> | package="project.schafkopfzaehler_2"> | ||||
<uses-permission android:name="android.permission.CAMERA"/> | |||||
<uses-feature android:name="android.hardware.camera" android:required="false"/> | |||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/> | |||||
<uses-feature android:name="android.hardware.camera.front" android:required="false"/> | |||||
<uses-feature android:name="android.hardware.camera.front.autofocus" android:required="false"/> | |||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |||||
<application | <application | ||||
android:allowBackup="true" | android:allowBackup="true" | ||||
android:icon="@mipmap/ic_launcher" | android:icon="@mipmap/ic_launcher" | ||||
android:name=".MainGameActivity" | android:name=".MainGameActivity" | ||||
android:label="@string/title_activity_main_game" | android:label="@string/title_activity_main_game" | ||||
android:screenOrientation="portrait" | android:screenOrientation="portrait" | ||||
android:theme="@style/AppTheme.NoActionBar" /> | |||||
android:theme="@style/AppTheme.NoActionBar" | |||||
/> | |||||
<activity | <activity | ||||
android:name=".ChooseGame" | android:name=".ChooseGame" | ||||
android:label="@string/title_choose_game" | |||||
android:screenOrientation="portrait" | android:screenOrientation="portrait" | ||||
android:theme="@style/AppTheme.NoActionBar" | android:theme="@style/AppTheme.NoActionBar" | ||||
></activity> | |||||
/> | |||||
</application> | </application> | ||||
</manifest> | </manifest> |
import android.content.Intent; | import android.content.Intent; | ||||
import android.os.Bundle; | import android.os.Bundle; | ||||
import android.provider.MediaStore; | |||||
import android.support.design.widget.FloatingActionButton; | import android.support.design.widget.FloatingActionButton; | ||||
import android.support.design.widget.Snackbar; | import android.support.design.widget.Snackbar; | ||||
import android.support.v7.app.AppCompatActivity; | import android.support.v7.app.AppCompatActivity; | ||||
private Button p1, p2, p3, p4, chooseGame; // Button init | private Button p1, p2, p3, p4, chooseGame; // Button init | ||||
private TextView choice; | private TextView choice; | ||||
private String playerNames[] = {"", "", "", ""}; // Player names init | private String playerNames[] = {"", "", "", ""}; // Player names init | ||||
static final int REQUEST_VIDEO_CAPTURE = 1; | |||||
private View.OnClickListener startClickListener = new View.OnClickListener() { | private View.OnClickListener startClickListener = new View.OnClickListener() { | ||||
private void playerButtonClicked (View v) { | private void playerButtonClicked (View v) { | ||||
Log.d("MainGame", v + " clicked..."); | Log.d("MainGame", v + " clicked..."); | ||||
Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); | |||||
if (takeVideoIntent.resolveActivity(getPackageManager()) != null) { | |||||
startActivityForResult(takeVideoIntent, REQUEST_VIDEO_CAPTURE); | |||||
} | |||||
} | } | ||||
choice.setText(announcement); | choice.setText(announcement); | ||||
} | } | ||||
} | } | ||||
if (requestCode == REQUEST_VIDEO_CAPTURE && resultCode == RESULT_OK) { | |||||
// Do nothing... | |||||
} | |||||
} | } | ||||
} | } |
<?xml version="1.0" encoding="utf-8"?> | |||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:background="@drawable/woodentable"> | |||||
<FrameLayout | |||||
android:id="@+id/camera_preview" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:layout_above="@+id/button_capture" | |||||
android:layout_alignParentTop="true"> | |||||
</FrameLayout> | |||||
<Button | |||||
android:id="@+id/button_capture" | |||||
style="?android:borderlessButtonStyle" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:layout_centerHorizontal="true" | |||||
android:background="@android:color/holo_green_dark" | |||||
android:fontFamily="@font/germania_one" | |||||
android:text="@string/announcement" | |||||
android:textColor="@android:color/black" | |||||
android:textSize="24sp" /> | |||||
<TextView | |||||
android:id="@+id/capture_log" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:layout_alignParentBottom="true" | |||||
android:layout_below="@+id/button_capture" | |||||
android:text="TextView" /> | |||||
</RelativeLayout> |
<string name="call">Was wurde gerufen?</string> | <string name="call">Was wurde gerufen?</string> | ||||
<string name="soloCall">Was war die Trumpffarbe?</string> | <string name="soloCall">Was war die Trumpffarbe?</string> | ||||
<string name="title_activity_main_game">ActivityMainGame</string> | <string name="title_activity_main_game">ActivityMainGame</string> | ||||
<string name="title_choose_game">ChooseGame</string> | |||||
<string name="announcement">Neue Ansage</string> | <string name="announcement">Neue Ansage</string> | ||||
<string name="announcementMade">Angesagt\:</string> | <string name="announcementMade">Angesagt\:</string> | ||||
<string name="noChoice">Es wurde noch nichts angesagt...</string> | <string name="noChoice">Es wurde noch nichts angesagt...</string> |
include ':app' | include ':app' | ||||
include ':openCVLibrary343' |