うまくいきましたが、突然視覚的な問題が発生し始めたため、この問題を解決するための場所がわかりません。アンドロイド:カスタムスライダでの視覚的な問題
この問題は、周囲に黒い枠線やグラデーションが現れる問題です。私はアンドロイド6とアンドロイド4.0.3でテストしました。両方とも同じ問題を示しています。アンドロイド4.0.3では、私はそれらを押すと、ツールバーのアクションの周りのこの問題を見ることができます、それは黒い勾配の影のようになります。
任意のアイデア?
私のスライダーのコードは次のとおりです。
public class StyledSeekBar extends SeekBar {
public StyledSeekBar(Context context) {
super(context);
this.init();
}
public StyledSeekBar(Context context, AttributeSet attrs) {
super(context, attrs);
this.init();
}
public StyledSeekBar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
this.init();
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public StyledSeekBar(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
this.init();
}
/**
* Initializes the instance of this class.
*/
private void init(){
setThumb(getResources().getDrawable(R.drawable.apptheme_scrubber_control_selector_holo_light));
setIndeterminateDrawable(getResources().getDrawable(R.drawable.apptheme_scrubber_progress_horizontal_holo_light));
setProgressDrawable(getResources().getDrawable(R.drawable.apptheme_scrubber_progress_horizontal_holo_light));
}
}
私はあなたが正しいと思う。私はちょうど似たようなものを見せているこのウェブページを見つけました。私は家で一度それを試してみましょう。ありがとうございました!ページはそこにあります:http://wptrafficanalyzer.in/blog/working-with-9-patch-nine-patch-images-in-android/ – Shibakaneki