-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4248f0
commit 3b8200b
Showing
4 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/drdisagree/colorblendr/ui/widgets/ResizableSeekbar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.drdisagree.colorblendr.ui.widgets; | ||
|
||
import android.content.Context; | ||
import android.graphics.drawable.Drawable; | ||
import android.util.AttributeSet; | ||
|
||
public class ResizableSeekbar extends androidx.appcompat.widget.AppCompatSeekBar { | ||
|
||
public ResizableSeekbar(Context context) { | ||
super(context); | ||
} | ||
|
||
public ResizableSeekbar(Context context, AttributeSet attrs) { | ||
super(context, attrs); | ||
} | ||
|
||
public ResizableSeekbar(Context context, AttributeSet attrs, int defStyle) { | ||
super(context, attrs, defStyle); | ||
} | ||
|
||
@Override | ||
protected synchronized void onSizeChanged(int w, int h, int oldw, int oldh) { | ||
super.onSizeChanged(w, h, oldw, oldh); | ||
|
||
Drawable trackDrawable = getProgressDrawable().getCurrent(); | ||
trackDrawable.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters