Minor fixes
This commit is contained in:
parent
5254e7f1c8
commit
31d62b2eda
3 changed files with 31 additions and 34 deletions
|
@ -1,17 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/background">
|
||||
<shape android:shape="rectangle" >
|
||||
<solid
|
||||
android:color="#4d007eb3" />
|
||||
<corners android:radius="30dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@+id/progress">
|
||||
<shape android:shape="rectangle" >
|
||||
<solid
|
||||
android:color="@color/color_white" />
|
||||
<corners android:radius="30dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/background">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#4d007eb3" />
|
||||
<corners android:radius="30dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@+id/progress">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_white" />
|
||||
<corners android:radius="30dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<item android:id="@+id/thump">
|
||||
<shape android:shape="oval">
|
||||
<size
|
||||
android:height="12dp"
|
||||
android:width="12dp" />
|
||||
<solid android:color="@color/profile_icon_color_blue_light" />
|
||||
</shape>
|
||||
</item>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<item android:id="@+id/thump">
|
||||
<shape android:shape="oval">
|
||||
<size
|
||||
android:width="12dp"
|
||||
android:height="12dp" />
|
||||
<solid android:color="@color/profile_icon_color_blue_light" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -10,6 +10,12 @@ import android.view.View;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.SeekBar;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
|
@ -24,12 +30,6 @@ import net.osmand.plus.widgets.TextViewEx;
|
|||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import static net.osmand.plus.settings.bottomsheets.SingleSelectPreferenceBottomSheet.SELECTED_ENTRY_INDEX_KEY;
|
||||
|
||||
|
||||
|
@ -172,20 +172,19 @@ public class AnnouncementTimeBottomSheet extends BasePreferenceBottomSheet
|
|||
|
||||
private void setProfileColorToSeekBar() {
|
||||
int color = ContextCompat.getColor(app, getAppMode().getIconColorInfo().getColor(nightMode));
|
||||
int alpha = 70;
|
||||
|
||||
LayerDrawable seekBarProgressLayer =
|
||||
(LayerDrawable) ContextCompat.getDrawable(app, R.drawable.seekbar_progress_announcement_time);
|
||||
|
||||
GradientDrawable background = (GradientDrawable) seekBarProgressLayer.findDrawableByLayerId(R.id.background);
|
||||
background.setColor(color);
|
||||
background.setAlpha(alpha);
|
||||
background.setAlpha(70);
|
||||
|
||||
GradientDrawable progress = (GradientDrawable) seekBarProgressLayer.findDrawableByLayerId(R.id.progress);
|
||||
progress.setColor(color);
|
||||
Drawable clippedProgress = new ClipDrawable(progress, Gravity.CENTER_VERTICAL | Gravity.START, 1);
|
||||
|
||||
seekBarArrival.setProgressDrawable(new LayerDrawable(new Drawable[]{
|
||||
seekBarArrival.setProgressDrawable(new LayerDrawable(new Drawable[] {
|
||||
background, clippedProgress
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue