Commit 874917f4 authored by Eryk Leniart's avatar Eryk Leniart

muhahahahhaa

parent d2a2a29b
......@@ -5,8 +5,8 @@
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.2.1" />
<option name="gradleJvm" value="1.7" />
<option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.4" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
......
......@@ -3,6 +3,30 @@
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
......@@ -13,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
......@@ -12,10 +12,12 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
<afterSyncTasks>
<task>generateDebugAndroidTestSources</task>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
......@@ -24,7 +26,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
<exclude-output />
......
......@@ -30,17 +30,18 @@
android:name=".PeepersApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher_peepers"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
android:label="@string/app_name">
<activity
android:name=".StreamCameraActivity"
android:label="@string/app_name"
android:screenOrientation="landscape" >
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar">
</activity>
<activity android:name=".PeepersPreferenceActivity" />
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
android:label="@string/title_activity_main"
android:theme="@android:style/Theme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
......@@ -20,6 +20,7 @@ public class MainActivity extends Activity {
EditText mEdit;
String myIp;
TextView myIpView;
private MenuItem mSettingsMenuItem = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -32,26 +33,24 @@ public class MainActivity extends Activity {
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
public boolean onCreateOptionsMenu(final Menu menu)
{
super.onCreateOptionsMenu(menu);
mSettingsMenuItem = menu.add(R.string.settings);
mSettingsMenuItem.setIcon(android.R.drawable.ic_menu_manage);
return true;
}
} // onCreateOptionsMenu(Menu)
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public boolean onOptionsItemSelected(final MenuItem item)
{
if (item != mSettingsMenuItem)
{
return super.onOptionsItemSelected(item);
} // if
startActivity(new Intent(this, PeepersPreferenceActivity.class));
return true;
} // onOptionsItemSelected(MenuItem)
public void startView(View myView){
Intent intent = new Intent(MainActivity.this, StreamCameraActivity.class);
......
......@@ -47,8 +47,6 @@ import android.widget.TextView;
public final class StreamCameraActivity extends Activity
implements SurfaceHolder.Callback
{
private static final String TAG = StreamCameraActivity.class.getSimpleName();
private static final String WAKE_LOCK_TAG = "peepers";
private static final String PREF_CAMERA = "camera";
......@@ -74,10 +72,8 @@ public final class StreamCameraActivity extends Activity
private int mPort = PREF_PORT_DEF;
private int mJpegQuality = PREF_JPEG_QUALITY_DEF;
private int mPrevieSizeIndex = PREF_PREVIEW_SIZE_INDEX_DEF;
private TextView mIpAddressView = null;
private LoadPreferencesTask mLoadPreferencesTask = null;
private SharedPreferences mPrefs = null;
private MenuItem mSettingsMenuItem = null;
private WakeLock mWakeLock = null;
private WebView myWebView = null;
private String clientAddressIp = "";
......@@ -96,7 +92,7 @@ public final class StreamCameraActivity extends Activity
Intent iin= getIntent();
Bundle b = iin.getExtras();
clientAddressIp = (String) b.get("ip"); // client ip
clientAddressIp = b.get("ip") + ":8080"; // client ip
new LoadPreferencesTask().execute();
......@@ -186,25 +182,7 @@ public final class StreamCameraActivity extends Activity
} // if
} // stopCameraStreamer()
@Override
public boolean onCreateOptionsMenu(final Menu menu)
{
super.onCreateOptionsMenu(menu);
mSettingsMenuItem = menu.add(R.string.settings);
mSettingsMenuItem.setIcon(android.R.drawable.ic_menu_manage);
return true;
} // onCreateOptionsMenu(Menu)
@Override
public boolean onOptionsItemSelected(final MenuItem item)
{
if (item != mSettingsMenuItem)
{
return super.onOptionsItemSelected(item);
} // if
startActivity(new Intent(this, PeepersPreferenceActivity.class));
return true;
} // onOptionsItemSelected(MenuItem)
private final class LoadPreferencesTask
extends AsyncTask<Void, Void, SharedPreferences>
......
......@@ -10,7 +10,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/input_address"
android:text="192.168.43.116:8080"
android:text="192.168.43.116"
android:layout_alignEnd="@+id/go_to_view" />
<TextView
......
......@@ -15,28 +15,30 @@
limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<SurfaceView
android:id="@+id/camera"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
android:layout_height="fill_parent" />
<Button
android:layout_width="wrap_content"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="dupa blada !"
android:text="Go!"
android:id="@+id/client_mode"
android:onClick="showWebView"
android:layout_alignParentEnd="true"
android:layout_centerInParent="true"
android:layout_alignParentBottom="true"
/>
</merge>
</RelativeLayout>
......@@ -8,7 +8,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
......
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