Skip to content

Commit

Permalink
Remove small bugs and update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bleedweedsuz committed Jan 20, 2021
1 parent 83c8ca5 commit d6ba32a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ private void readAttributes(Context context, AttributeSet attrs){
knobRotorRes_Active = typedArray.getResourceId(R.styleable.RotatoryKnobView_RotatoryKnob_ImageActive, R.drawable.light_knob_rotor);
knobRotorRes_InActive = typedArray.getResourceId(R.styleable.RotatoryKnobView_RotatoryKnob_ImageInactive, R.drawable.light_knob_rotor_inactive);

knobRotorTapButtonRes_Active = typedArray.getResourceId(R.styleable.RotatoryKnobView_knobRotorTapButtonRes_ImageActive, R.drawable.knob_rotor_btn_active);
knobRotorTapButtonRes_InActive = typedArray.getResourceId(R.styleable.RotatoryKnobView_knobRotorTapButtonRes_ImageInActive, R.drawable.knob_rotor_btn_inactive);
knobRotorTapButtonRes_Active = typedArray.getResourceId(R.styleable.RotatoryKnobView_RotatoryKnobTap_ImageActive, R.drawable.knob_rotor_btn_active);
knobRotorTapButtonRes_InActive = typedArray.getResourceId(R.styleable.RotatoryKnobView_RotatoryKnobTap_ImageInActive, R.drawable.knob_rotor_btn_inactive);

isTapKnob = typedArray.getBoolean(R.styleable.RotatoryKnobView_RotatoryKnob_TapEnable, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<attr name="RotatoryKnob_ImageBack" format="reference" />
<attr name="RotatoryKnob_ImageActive" format="reference" />
<attr name="RotatoryKnob_ImageInactive" format="reference" />
<attr name="knobRotorTapButtonRes_ImageActive" format="reference" />
<attr name="knobRotorTapButtonRes_ImageInActive" format="reference" />
<attr name="RotatoryKnobTap_ImageActive" format="reference" />
<attr name="RotatoryKnobTap_ImageInActive" format="reference" />
<attr name="RotatoryKnob_RotorValue" format="integer" />
<attr name="RotatoryKnob_TapEnable" format="boolean"/>
<attr name="RotatoryKnob_MinRotorValue" format="integer" />
Expand Down
15 changes: 14 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ dependencies {
android:layout_width="100dp"
android:layout_height="100dp"
app:RotatoryKnob_TapEnable="true"
app:RotatoryKnob_KnobTapSize="40dp"
app:RotatoryKnob_ImageBack="@drawable/knob_back"
app:RotatoryKnob_ImageActive="@drawable/knob_active"
app:RotatoryKnob_ImageInactive="@drawable/knob_inactive"
app:RotatoryKnobTap_ImageActive="@drawable/tap_active"
app:RotatoryKnobTap_ImageInActive="@drawable/tap_inactive"
app:RotatoryKnob_MaxRotorValue="100"
app:RotatoryKnob_MinRotorValue="0"
app:RotatoryKnob_RotorStep="1"
Expand Down Expand Up @@ -57,6 +64,12 @@ rotatoryKnobView.setOnRotatoryKnobViewListener(new RotatoryKnobView.RotatoryKnob
Log.d(TAG, rotatoryKnobView.getRotorAngle() + " :Knob");
Log.d(TAG, rotatoryKnobView.getRotorStep() + " :Knob");
}
@Override
public void onTap(boolean isTap) {
Log.e(TAG, isTap + " Knob Tap");
rotatoryText.setText(isTap?"Tap":"UnTap");
}
});
....
```
Expand All @@ -67,4 +80,4 @@ rotatoryKnobView.setOnRotatoryKnobViewListener(new RotatoryKnobView.RotatoryKnob
### Upcoming Features
- [ ] Non infinite rotary knob using range value[a-b].
- [ ] Add click sound for per rotor value increment or decrement.
- [ ] Tap system in rotary knob, using circle radius system.
- [x] Tap system in rotary knob, using circle radius system.

0 comments on commit d6ba32a

Please # to comment.