Skip to content

Instantly share code, notes, and snippets.

@MehdiFal
Last active November 9, 2018 15:29
Show Gist options
  • Save MehdiFal/562dd6b90636f73126905c9640a32c75 to your computer and use it in GitHub Desktop.
Save MehdiFal/562dd6b90636f73126905c9640a32c75 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="Graph">
<attr name="gradientColorStart" format="color"/>
<attr name="gradientColorEnd" format="color"/>
<attr name="markerColor" format="color"/>
<attr name="markerRadius" format="dimension" />
<attr name="connectLinesColor" format="color"/>
<attr name="connectLinesWidth" format="dimension" />
<attr name="guidelinesFilledColor" format="color"/>
<attr name="guidelinesFilledHeight" format="dimension" />
<attr name="guidelinesEmptyHeight" format="dimension" />
<attr name="guidelinesWidth" format="dimension"/>
<attr name="graduationTextColor" format="color"/>
<attr name="graduationTextSize" format="dimension" />
</declare-styleable>
</resources>
<com.test.graphvisualizer.Graph
android:id="@+id/graph"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingLeft="35dp"
android:paddingStart="35dp"
android:paddingRight="35dp"
android:paddingEnd="35dp"
android:paddingTop="100dp"
android:paddingBottom="100dp"
app:gradientColorStart="@color/greenDark"
app:gradientColorEnd="@color/greenLight"
app:markerColor="@color/greenDark"
app:markerRadius="3dp"
app:connectLinesColor="@color/greenDark"
app:connectLinesWidth="2dp"
app:guidelinesFilledColor="@color/gray"
app:guidelinesFilledHeight="5dp"
app:guidelinesEmptyHeight="5dp"
app:guidelinesWidth="2dp"
app:graduationTextColor="@color/gray"
app:graduationTextSize="12sp" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment