Giter Club home page Giter Club logo

attitudeview's Introduction

Android - AttitudeView

Android Arsenal

Android attitude view for drones, airplanes, rovs and mobile robots.

Demo


How install it

How to use it

  1. In XML File:

  2. In the root ViewGroup property of your layout, specify: xmlns:custom="http://schemas.android.com/apk/res-auto";

  3. Within the ViewGroup, add the following code: <package.AttitudeView android:id="@+id/attitudeView" android:layout_width="300dp" android:layout_height="300dp" />

  4. To change the color of the numbers: custom:textC="@android:color/black"

  5. To change the color of the ticks in the pitch indicator use:custom:lineC="@android:color/black""

  6. To change the background color of the roll indicator use: custom:markerC="#fff741"

  7. In Code:

AttitudeView  av= (AttitudeView) findViewById(R.id.attitudeView);
// Specify the property like layout params
av.setPitch(20); // Update the Pitch value in degrees.
float pitch=av.getPitch(); // Update get the actual pitch value degrees.
av.setRoll(10); // Update the Roll value in degrees.
float roll=av.getRoll(); // Update get the actual roll value degrees.

For further details, checkout the AttitudeView.java class.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.