MCPcopy Index your code
hub / github.com/enginebai/SwagPoints

github.com/enginebai/SwagPoints @v1.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.2 ↗ · + Follow
50 symbols 79 edges 6 files 6 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SwagPoints

License Download

SwagPoints - An Android custom circular SeekBar that supports max/min range and step settings.

SwagPoints

Gradle

dependencies {
    ...
    compile 'com.dualcores.swagpoints:swagpoints:1.0.2'
}

Usage

  • In XML layout:
<com.dualcores.swagpoints.SwagPoints
    xmlns:swagpoints="http://schemas.android.com/apk/res-auto"
    android:id="@+id/seekbar_point"
    android:layout_width="match_parent"
    android:layout_height="340dp"
    android:layout_gravity="center"
    android:padding="64dp"
    swagpoints:min="100"
    swagpoints:max="1000"
    swagpoints:step="100"
    swagpoints:progressColor="@color/color_progress"
    swagpoints:progressWidth="12dp"
    swagpoints:arcColor="@color/color_arc"
    swagpoints:arcWidth="8dp"
    swagpoints:textSize="72sp"
    swagpoints:textColor="@color/colorText"
    swagpoints:indicatorIcon="@drawable/indicator"
    />

Remember to add layout_padding to make sure that there is enough space to display the whole widget and indicator drawable.

If you don't add any layout_padding, the arc will extend the whole width/height, and the indicator drawable will be truncated (as below diagram).

  • All customizable attributes:
<declare-styleable name="SwagPoints">
    <attr name="points" format="integer" />
    <attr name="max" format="integer" />
    <attr name="min" format="integer"/>
    <attr name="step" format="integer"/>
    <attr name="indicatorIcon" format="reference" />
    <attr name="progressWidth" format="dimension" />
    <attr name="progressColor" format="color" />
    <attr name="arcWidth" format="dimension" />
    <attr name="arcColor" format="color" />
    <attr name="textSize" format="dimension"/>
    <attr name="textColor" format="color"/>
    <attr name="clockwise" format="boolean" />
    <attr name="enabled" format="boolean" />
</declare-styleable>

Sample

  • Clone the repository and check out the app module.
  • Download the app Swag – Exchange Personal Snaps on Google Play. This widget is used in the send point dialog.

Licence

Copyright 2016 Engine Bai

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

OnSwagPointsChangeListener (Interface)
(no doc)
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java

Core symbols most depended-on inside this repo

valuePerDegree
called by 3
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java
onPointsChanged
called by 3
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java
init
called by 2
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java
updateIndicatorIconPosition
called by 2
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java
updateProgress
called by 2
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java
onStopTrackingTouch
called by 2
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java
updateOnTouch
called by 1
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java
convertTouchEventPointToAngle
called by 1
library/src/main/java/com/dualcores/swagpoints/SwagPoints.java

Shape

Method 43
Class 6
Interface 1

Languages

Java100%

Modules by API surface

library/src/main/java/com/dualcores/swagpoints/SwagPoints.java40 symbols
library/src/test/java/com/dualcores/swagpoints/ExampleUnitTest.java2 symbols
library/src/androidTest/java/com/dualcores/swagpoints/ApplicationTest.java2 symbols
app/src/test/java/com/dualcores/swagpoint/ExampleUnitTest.java2 symbols
app/src/main/java/com/dualcores/swagpoint/MainActivity.java2 symbols
app/src/androidTest/java/com/dualcores/swagpoint/ApplicationTest.java2 symbols

For agents

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

⬇ download graph artifact