2017-06-05 5 views
-1

Radial SeekBarplaese誰も私がラジアルシークバー

を描くのを助けることができるラジアルシークバーを描画する方法に私を助けてくださいは、Plaeseシークバーの実際の設計で画像のURLをご確認ください。私は多くの方法を試しましたが、適切に機能しませんでした。

私はあなたがこのような何かしたい場合は、この

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:id="@+id/activity_main" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingBottom="10dp" 
android:paddingLeft="10dp" 
android:paddingRight="10dp" 
android:paddingTop="10dp" 
tools:context="com.scanner.com.protracterview.MainActivity"> 

<TextView 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:text="0" 
    android:id="@+id/number" 
    android:textSize="18sp" 
    android:layout_marginBottom="30dp" 
    android:gravity="center"/> 

<com.goodiebag.protractorview.ProtractorView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    app:arcColor="#91d8f7" 
    app:arcProgressColor="#91d8f7" 
    app:tickColor="#4a4a4a" 
    app:indicatorType="line" 
    app:tickProgressColor="#abe6" 
    app:textColor="#000" 
    app:textProgressColor="#FF0000" 
    app:angleTextSize="0dp" 
    app:arcWidth="2dp" 
    app:progressWidth="2dp" 
    app:tickOffset="18dp" 
    app:tickLength="0dp" 
    app:angle="15" 
    android:id="@+id/protrat" 
    app:tickIntervals="15" 
    app:ticksBetweenLabel="three" 
    app:touchInside="true" 
    app:roundEdges="true" 
    android:layout_below="@+id/number" 
    android:layout_alignParentEnd="true" /> 

+2

あなたの試したことと「正しく機能しなかった」ことを示す[mcve]を提供するために質問を編集してください。たとえば、[Androidアーケル](https://android-arsenal.com)で検索したところ、[この実装](https://github.com/GoodieBag/ProtractorView)が約2分で見つかりました。たぶんあなたはそれを使うことができますし、自分のものを実装する方法を知ることもできます。 – CommonsWare

答えて

1

enter image description here

ようにしようとした - フォローthis - (Matt Joseph

  1. をクラスがありますCircularSeekBar.java(RES /値の/ attrs.xml)プロジェクト
  2. attrs.xmlに
  3. を貼り付けして、xmlファイルは次のようにする必要があり、

    <mrbrown.arcseekbar.CircularSeekBar 
        android:id="@+id/circularSeekBar1" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        app:start_angle="180" 
        app:end_angle="0" 
        app:circle_x_radius="500dp" 
        app:circle_y_radius="500dp" 
        app:use_custom_radii="true" 
        app:progress="0" 
        app:max="100" 
        app:pointer_alpha_ontouch="100" 
        app:pointer_color="#0174DF" 
        app:pointer_halo_color="#880174DF"/> 
    

+0

suppportのためにありがとう..私は一番下の行をしたい –

関連する問題