-
Notifications
You must be signed in to change notification settings - Fork 42
hw4 #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LevOspennikov
wants to merge
4
commits into
IFMO-Android-2015:master
Choose a base branch
from
LevOspennikov:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
hw4 #68
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1 @@ | ||
| # Компас | ||
| Написать просто приложени "Компас". Должно состоять из одного экрана, отрисовывать направление на север, считывать показания сенсора. | ||
|
|
||
| ## В pull-request-ы добавляйте, пожалуйста, сним экрана того, что получилось. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="hw3(compas)" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> | ||
| <component name="FacetManager"> | ||
| <facet type="android-gradle" name="Android-Gradle"> | ||
| <configuration> | ||
| <option name="GRADLE_PROJECT_PATH" value=":app" /> | ||
| </configuration> | ||
| </facet> | ||
| <facet type="android" name="Android"> | ||
| <configuration> | ||
| <option name="SELECTED_BUILD_VARIANT" value="debug" /> | ||
| <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="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" /> | ||
| <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" /> | ||
| <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" /> | ||
| <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /> | ||
| <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> | ||
| </configuration> | ||
| </facet> | ||
| </component> | ||
| <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" 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 /> | ||
| <content url="file://$MODULE_DIR$"> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> | ||
| </content> | ||
| <orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" /> | ||
| <orderEntry type="sourceFolder" forTests="false" /> | ||
| <orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" /> | ||
| <orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" /> | ||
| <orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" /> | ||
| </component> | ||
| </module> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| apply plugin: 'com.android.application' | ||
|
|
||
| android { | ||
| compileSdkVersion 23 | ||
| buildToolsVersion "23.0.2" | ||
|
|
||
| defaultConfig { | ||
| applicationId "ru.ifmo.ospen_000.hw3compas" | ||
| minSdkVersion 15 | ||
| targetSdkVersion 23 | ||
| versionCode 1 | ||
| versionName "1.0" | ||
| } | ||
| buildTypes { | ||
| release { | ||
| minifyEnabled false | ||
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| compile fileTree(dir: 'libs', include: ['*.jar']) | ||
| testCompile 'junit:junit:4.12' | ||
| compile 'com.android.support:appcompat-v7:23.1.1' | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Add project specific ProGuard rules here. | ||
| # By default, the flags in this file are appended to flags specified | ||
| # in C:\Users\ospen_000\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt | ||
| # You can edit the include path and order by changing the proguardFiles | ||
| # directive in build.gradle. | ||
| # | ||
| # For more details, see | ||
| # http://developer.android.com/guide/developing/tools/proguard.html | ||
|
|
||
| # Add any project specific keep options here: | ||
|
|
||
| # If your project uses WebView with JS, uncomment the following | ||
| # and specify the fully qualified class name to the JavaScript interface | ||
| # class: | ||
| #-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
| # public *; | ||
| #} |
13 changes: 13 additions & 0 deletions
13
app/src/androidTest/java/ru/ifmo/ospen_000/hw3compas/ApplicationTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package ru.ifmo.ospen_000.hw3compas; | ||
|
|
||
| import android.app.Application; | ||
| import android.test.ApplicationTestCase; | ||
|
|
||
| /** | ||
| * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> | ||
| */ | ||
| public class ApplicationTest extends ApplicationTestCase<Application> { | ||
| public ApplicationTest() { | ||
| super(Application.class); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| package="ru.ifmo.ospen_000.hw3compas" > | ||
|
|
||
| <application | ||
| android:allowBackup="true" | ||
| android:icon="@mipmap/ic_launcher" | ||
| android:label="@string/app_name" | ||
| android:supportsRtl="true" | ||
| android:theme="@style/AppTheme" > | ||
| <activity android:name=".MainActivity" > | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.MAIN" /> | ||
|
|
||
| <category android:name="android.intent.category.LAUNCHER" /> | ||
| </intent-filter> | ||
| </activity> | ||
| </application> | ||
|
|
||
| </manifest> |
85 changes: 85 additions & 0 deletions
85
app/src/main/java/ru/ifmo/ospen_000/hw3compas/MainActivity.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| package ru.ifmo.ospen_000.hw3compas; | ||
|
|
||
| import android.app.Activity; | ||
| import android.hardware.Sensor; | ||
| import android.hardware.SensorEvent; | ||
| import android.hardware.SensorEventListener; | ||
| import android.hardware.SensorManager; | ||
| import android.os.Bundle; | ||
| import android.view.animation.Animation; | ||
| import android.view.animation.RotateAnimation; | ||
| import android.widget.ImageView; | ||
|
|
||
| public class MainActivity extends Activity implements SensorEventListener { | ||
|
|
||
| private ImageView pointer; | ||
| private SensorManager sensorManager; | ||
| private Sensor accelerometer; | ||
| private Sensor magnetometer; | ||
| private float[] lastAccelerometers = new float[3]; | ||
| private float[] lastMagnetometers = new float[3]; | ||
| private boolean haveLastAccelerometer = false; | ||
| private boolean haveLastMagnetometer = false; | ||
| private float[] rotation = new float[9]; | ||
| private float[] orientation = new float[3]; | ||
| private float degree = 0f; | ||
|
|
||
| @Override | ||
| protected void onCreate(Bundle savedInstanceState) { | ||
| super.onCreate(savedInstanceState); | ||
| setContentView(R.layout.activity_main); | ||
| sensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); | ||
| accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); | ||
| magnetometer = sensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); | ||
| pointer = (ImageView) findViewById(R.id.pointer); | ||
| } | ||
|
|
||
| protected void onResume() { | ||
| super.onResume(); | ||
| sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_GAME); | ||
| sensorManager.registerListener(this, magnetometer, SensorManager.SENSOR_DELAY_GAME); | ||
| } | ||
|
|
||
| protected void onPause() { | ||
| super.onPause(); | ||
| sensorManager.unregisterListener(this, accelerometer); | ||
| sensorManager.unregisterListener(this, magnetometer); | ||
| } | ||
|
|
||
| @Override | ||
| public void onSensorChanged(SensorEvent event) { | ||
| if (event.sensor == accelerometer) { | ||
| System.arraycopy(event.values, 0, lastAccelerometers, 0, event.values.length); | ||
| haveLastAccelerometer = true; | ||
| } else if (event.sensor == magnetometer) { | ||
| System.arraycopy(event.values, 0, lastMagnetometers, 0, event.values.length); | ||
| haveLastMagnetometer = true; | ||
| } | ||
| if (haveLastAccelerometer && haveLastMagnetometer) { | ||
| SensorManager.getRotationMatrix(rotation, null, lastAccelerometers, lastMagnetometers); | ||
| SensorManager.getOrientation(rotation, orientation); | ||
| float azimuthInRadians = orientation[0]; | ||
| float azimuthInDegress = (float)(Math.toDegrees(azimuthInRadians)+360)%360; | ||
| RotateAnimation ra = new RotateAnimation( | ||
| degree, | ||
| -azimuthInDegress, | ||
| Animation.RELATIVE_TO_SELF, 0.5f, | ||
| Animation.RELATIVE_TO_SELF, | ||
| 0.5f); | ||
|
|
||
| ra.setDuration(200); | ||
|
|
||
| ra.setFillAfter(true); | ||
|
|
||
| pointer.startAnimation(ra); | ||
| degree = -azimuthInDegress; | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public void onAccuracyChanged(Sensor sensor, int accuracy) { | ||
|
|
||
|
|
||
| } | ||
|
|
||
| } | ||
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" | ||
| android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" | ||
| android:paddingRight="@dimen/activity_horizontal_margin" | ||
| android:paddingTop="@dimen/activity_vertical_margin" | ||
| android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity" | ||
| android:background="@drawable/background"> | ||
|
|
||
| <ImageView | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:id="@+id/pointer" | ||
| android:layout_alignParentEnd="false" | ||
| android:layout_centerInParent="true" | ||
| android:layout_alignParentStart="false" | ||
| android:src="@drawable/arrow" /> | ||
| </RelativeLayout> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <resources> | ||
| <!-- Example customization of dimensions originally defined in res/values/dimens.xml | ||
| (such as screen margins) for screens with more than 820dp of available width. This | ||
| would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> | ||
| <dimen name="activity_horizontal_margin">64dp</dimen> | ||
| </resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <color name="colorPrimary">#3F51B5</color> | ||
| <color name="colorPrimaryDark">#303F9F</color> | ||
| <color name="colorAccent">#FF4081</color> | ||
| </resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <resources> | ||
| <!-- Default screen margins, per the Android Design guidelines. --> | ||
| <dimen name="activity_horizontal_margin">16dp</dimen> | ||
| <dimen name="activity_vertical_margin">16dp</dimen> | ||
| </resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <resources> | ||
| <string name="app_name">hw3(compas)</string> | ||
| </resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <resources> | ||
|
|
||
| <!-- Base application theme. --> | ||
| <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | ||
| <!-- Customize your theme here. --> | ||
| <item name="colorPrimary">@color/colorPrimary</item> | ||
| <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
| <item name="colorAccent">@color/colorAccent</item> | ||
| </style> | ||
|
|
||
| </resources> |
15 changes: 15 additions & 0 deletions
15
app/src/test/java/ru/ifmo/ospen_000/hw3compas/ExampleUnitTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package ru.ifmo.ospen_000.hw3compas; | ||
|
|
||
| import org.junit.Test; | ||
|
|
||
| import static org.junit.Assert.*; | ||
|
|
||
| /** | ||
| * To work on unit tests, switch the Test Artifact in the Build Variants view. | ||
| */ | ||
| public class ExampleUnitTest { | ||
| @Test | ||
| public void addition_isCorrect() throws Exception { | ||
| assertEquals(4, 2 + 2); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
|
||
| buildscript { | ||
| repositories { | ||
| jcenter() | ||
| } | ||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:1.3.0' | ||
|
|
||
| // NOTE: Do not place your application dependencies here; they belong | ||
| // in the individual module build.gradle files | ||
| } | ||
| } | ||
|
|
||
| allprojects { | ||
| repositories { | ||
| jcenter() | ||
| } | ||
| } | ||
|
|
||
| task clean(type: Delete) { | ||
| delete rootProject.buildDir | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Project-wide Gradle settings. | ||
|
|
||
| # IDE (e.g. Android Studio) users: | ||
| # Gradle settings configured through the IDE *will override* | ||
| # any settings specified in this file. | ||
|
|
||
| # For more details on how to configure your build environment visit | ||
| # http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
|
||
| # Specifies the JVM arguments used for the daemon process. | ||
| # The setting is particularly useful for tweaking memory settings. | ||
| # Default value: -Xmx10248m -XX:MaxPermSize=256m | ||
| # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 | ||
|
|
||
| # When configured, Gradle will run in incubating parallel mode. | ||
| # This option should only be used with decoupled projects. More details, visit | ||
| # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
| # org.gradle.parallel=true |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #Mon May 02 16:30:32 MSK 2016 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не вижу код, который бы подписывался на события от датчика.