Skip to content

Commit

Permalink
remove leak canary and constraint layout integration
Browse files Browse the repository at this point in the history
  • Loading branch information
billhsu committed Dec 7, 2016
1 parent 35d0148 commit c630b58
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 57 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Attitude Heading Reference System(AHRS) display module for Android.

```
dependencies {
compile 'com.github.billhsu:AndroidAHRSView:1.0.0'
compile 'com.github.billhsu:AndroidAHRSView:1.0.1'
}
```

Expand All @@ -47,7 +47,8 @@ ahrsView.setYaw(yaw);
```

#### Demo gif
![gif](https://raw.githubusercontent.com/billhsu/AndroidAHRSView/master/doc/demo.gif)
![gif1](https://raw.githubusercontent.com/billhsu/AndroidAHRSView/master/doc/demo1.gif)
![gif2](https://raw.githubusercontent.com/billhsu/AndroidAHRSView/master/doc/demo2.gif)

For more details please check the [SampleApp](https://github.com/billhsu/AndroidAHRSView/blob/master/SampleApp/) project.

Expand Down
4 changes: 0 additions & 4 deletions SampleApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,5 @@ dependencies {
})
compile 'com.android.support:appcompat-v7:23.4.0'
compile project(':AHRSView')
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
testCompile 'junit:junit:4.12'
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@

import android.app.Application;

import com.squareup.leakcanary.LeakCanary;

public class SampleApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
if (LeakCanary.isInAnalyzerProcess(this)) {
return;
}
LeakCanary.install(this);
}

}
84 changes: 39 additions & 45 deletions SampleApp/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,71 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout android:id="@+id/activity_main"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="me.billhsu.androidahrsview.MainActivity">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="me.billhsu.androidahrsview.MainActivity">

<me.billhsu.ahrsview.AHRSView
android:id="@+id/AHRSView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp" />

<TextView
android:id="@+id/rollText"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:text="@string/roll"
app:layout_constraintLeft_toLeftOf="@+id/AHRSView"
app:layout_constraintTop_toBottomOf="@+id/AHRSView"
/>
android:layout_alignLeft="@+id/AHRSView"
android:layout_alignStart="@+id/AHRSView"
android:layout_below="@+id/AHRSView"
android:layout_marginTop="30dp"
android:text="@string/roll" />

<SeekBar
android:id="@+id/seekBarRoll"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/rollText"
android:layout_alignEnd="@+id/AHRSView"
android:layout_alignRight="@+id/AHRSView"
android:layout_toEndOf="@+id/rollText"
android:layout_toRightOf="@+id/rollText"
android:max="360"
android:progress="180"
app:layout_constraintBottom_toBottomOf="@+id/rollText"
app:layout_constraintLeft_toRightOf="@+id/rollText"
app:layout_constraintRight_toRightOf="@+id/AHRSView"
/>
android:progress="180" />

<TextView
android:id="@+id/pitchText"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:text="@string/pitch"
app:layout_constraintLeft_toLeftOf="@+id/AHRSView"
app:layout_constraintTop_toBottomOf="@+id/rollText"
/>
android:layout_alignLeft="@+id/AHRSView"
android:layout_alignStart="@+id/AHRSView"
android:layout_below="@+id/rollText"
android:layout_marginTop="30dp"
android:text="@string/pitch" />

<SeekBar
android:id="@+id/seekBarPitch"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/pitchText"
android:layout_alignEnd="@+id/AHRSView"
android:layout_alignRight="@+id/AHRSView"
android:layout_toEndOf="@+id/pitchText"
android:layout_toRightOf="@+id/pitchText"
android:max="360"
android:progress="180"
app:layout_constraintBottom_toBottomOf="@+id/pitchText"
app:layout_constraintLeft_toRightOf="@+id/pitchText"
app:layout_constraintRight_toRightOf="@+id/AHRSView"
/>
android:progress="180" />


</android.support.constraint.ConstraintLayout>
</RelativeLayout>
File renamed without changes
Binary file added doc/demo2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c630b58

Please sign in to comment.