だから私はこれに自分で答えることができました...パスを使用してドローアブルを作成し、それらをつなぎ合わせて平行四辺形を作成しました。
public Drawable createThumbDrawable(boolean checked){
Path path = new Path();
path.moveTo(0, 0);
path.lineTo(1, 0);
path.lineTo(1, 1);
path.lineTo(0, 1);
path.close();
PathShape shape = new PathShape(path, 1, 1);
ShapeDrawable drawable = new ShapeDrawable(shape);
if (checked){
drawable.getPaint().setColor(Color.CYAN);
}
else
{
drawable.getPaint().setColor(Color.BLACK);
}
mThumbLeftDrawable = createLeftThumbDrawable(checked);
mThumbRightDrawable = createRightThumbDrawable(checked);
return drawable;
}
public Drawable createLeftThumbDrawable(boolean checked){
Path path = new Path();
path.moveTo(0, 25);
path.lineTo(25, 0);
path.lineTo(25, 25);
path.close();
PathShape shape = new PathShape(path, 25, 25);
ShapeDrawable drawable = new ShapeDrawable(shape);
if (checked){
drawable.getPaint().setColor(Color.CYAN);
}
else
{
drawable.getPaint().setColor(Color.BLACK);
}
return drawable;
}
public Drawable createRightThumbDrawable(boolean checked){
Path path = new Path();
path.moveTo(0,0);
path.lineTo(25, 0);
path.lineTo(0, 25);
path.close();
PathShape shape = new PathShape(path, 25, 25);
ShapeDrawable drawable = new ShapeDrawable(shape);
if (checked){
drawable.getPaint().setColor(Color.CYAN);
}
else
{
drawable.getPaint().setColor(Color.BLACK);
}
return drawable;
}
public void setChecked(boolean checked) {
//Log.d(TAG, "setChecked("+checked+")");
boolean lc = checked;
if (!mTextOnThumb) {
lc = !checked;
}
if (checked){
mThumbDrawable = createThumbDrawable(checked);//this.getContext().getResources().getDrawable(R.drawable.slide_off);
}
else {
mThumbDrawable = createThumbDrawable(checked);//this.getContext().getResources().getDrawable(R.drawable.slide);
}
super.setChecked(checked);
mThumbPosition = lc ? getThumbScrollRange() : 0;
invalidate();
}