MCPcopy Index your code
hub / github.com/arbelkilani/Compass-View

github.com/arbelkilani/Compass-View @v1.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.1 ↗ · + Follow
38 symbols 82 edges 8 files 15 documented · 39%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Compass View

License API

Compass view with full options style.

compass view

Setup

Add to your module's build.gradle:

allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

and to your app build.gradle:

dependencies {
  implementation 'com.github.arbelkilani:Compass-View:v1.1'
}

Usage

<edu.arbelkilani.compass.Compass
    android:id="@+id/compass_1"
    android:layout_width="200dp"
    android:layout_height="200dp"
    android:layout_alignParentStart="true"
    android:layout_centerVertical="true"
    app:degree_color="@color/blue"
    app:degrees_step="5"
    app:needle="@drawable/ic_needle_2"
    app:orientation_labels_color="@color/red"
    app:show_degree_value="false"
    app:show_orientation_labels="true"
    app:show_border="false"
    app:degree_value_color="@color/colorAccent"
    app:border_color="@color/red"/>
Params available in all views:
  • degree_color (color) - color of compass degree lines
  • degrees_step (int) - must be > 0 and < 360 . enable user to change style by changig degree shown count.
    example : for degrees_step = 90 => only for degrees will be shown.

  • needle (drawable) - the animated needle for the compass

  • show_orientation_labels (boolean) - enable to show or hide orientation labels N, E, S, W.

  • orientation_labels_color (color) - Orientation labels color, N, E, S, W

  • show_degree_value (boolean) - enable to show or hide degrees value inside the compass item.

  • degree_value_color (color) - change degrees value color.

  • show_border (boolean) - enable to show or hide an outer circle for the compass.

  • border_color (color) - change outer circle value color.
Compass Listener:

Compass compass = findViewById(R.id.compass_view);
compass.setListener(new CompassListener() {
    @Override
    public void onSensorChanged(SensorEvent event) {
        Log.d(TAG, "onSensorChanged : " + event);
    }

    @Override
    public void onAccuracyChanged(Sensor sensor, int accuracy) {
        Log.d(TAG, "onAccuracyChanged : sensor : " + sensor);
        Log.d(TAG, "onAccuracyChanged : accuracy : " + accuracy);
    }
});

License

Copyright 2018 Belkilani Ahmed Radhouane

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Extension points exported contracts — how you extend this code

CompassListener (Interface)
(no doc) [1 implementers]
compass/src/main/java/edu/arbelkilani/compass/CompassListener.java

Core symbols most depended-on inside this repo

init
called by 3
compass/src/main/java/edu/arbelkilani/compass/Compass.java
init
called by 3
compass/src/main/java/edu/arbelkilani/compass/CompassSkeleton.java
onSensorChanged
called by 1
compass/src/main/java/edu/arbelkilani/compass/CompassListener.java
onAccuracyChanged
called by 1
compass/src/main/java/edu/arbelkilani/compass/CompassListener.java
updateLayout
called by 1
compass/src/main/java/edu/arbelkilani/compass/Compass.java
updateNeedle
called by 1
compass/src/main/java/edu/arbelkilani/compass/Compass.java
updateTextDirection
called by 1
compass/src/main/java/edu/arbelkilani/compass/Compass.java
drawOuterCircle
called by 1
compass/src/main/java/edu/arbelkilani/compass/CompassSkeleton.java

Shape

Method 30
Class 7
Interface 1

Languages

Java100%

Modules by API surface

compass/src/main/java/edu/arbelkilani/compass/CompassSkeleton.java14 symbols
compass/src/main/java/edu/arbelkilani/compass/Compass.java11 symbols
compass/src/main/java/edu/arbelkilani/compass/CompassListener.java3 symbols
compass/src/test/java/edu/arbelkilani/compass/ExampleUnitTest.java2 symbols
compass/src/androidTest/java/edu/arbelkilani/compass/ExampleInstrumentedTest.java2 symbols
app/src/test/java/edu/arbelkilani/compassview/ExampleUnitTest.java2 symbols
app/src/main/java/edu/arbelkilani/compassview/MainActivity.java2 symbols
app/src/androidTest/java/edu/arbelkilani/compassview/ExampleInstrumentedTest.java2 symbols

For agents

$ claude mcp add Compass-View \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact