diff --git a/app/res/drawable-mdpi/tab_selected_focused_holo.9.png b/app/res/drawable-mdpi/tab_selected_focused_holo.9.png deleted file mode 100644 index 0894bfb09..000000000 Binary files a/app/res/drawable-mdpi/tab_selected_focused_holo.9.png and /dev/null differ diff --git a/app/res/drawable-mdpi/tab_selected_holo.9.png b/app/res/drawable-mdpi/tab_selected_holo.9.png deleted file mode 100644 index 7982f6837..000000000 Binary files a/app/res/drawable-mdpi/tab_selected_holo.9.png and /dev/null differ diff --git a/app/res/drawable-mdpi/tab_selected_pressed_holo.9.png b/app/res/drawable-mdpi/tab_selected_pressed_holo.9.png deleted file mode 100644 index df8c8ba6c..000000000 Binary files a/app/res/drawable-mdpi/tab_selected_pressed_holo.9.png and /dev/null differ diff --git a/app/res/drawable-mdpi/tab_unselected_focused_holo.9.png b/app/res/drawable-mdpi/tab_unselected_focused_holo.9.png deleted file mode 100644 index 08457312a..000000000 Binary files a/app/res/drawable-mdpi/tab_unselected_focused_holo.9.png and /dev/null differ diff --git a/app/res/drawable-mdpi/tab_unselected_holo.9.png b/app/res/drawable-mdpi/tab_unselected_holo.9.png deleted file mode 100644 index 24661d4e4..000000000 Binary files a/app/res/drawable-mdpi/tab_unselected_holo.9.png and /dev/null differ diff --git a/app/res/drawable-mdpi/tab_unselected_pressed_holo.9.png b/app/res/drawable-mdpi/tab_unselected_pressed_holo.9.png deleted file mode 100644 index da116b0f3..000000000 Binary files a/app/res/drawable-mdpi/tab_unselected_pressed_holo.9.png and /dev/null differ diff --git a/app/res/drawable/tab_indicator_holo.xml b/app/res/drawable/tab_indicator_holo.xml deleted file mode 100644 index 77f372126..000000000 --- a/app/res/drawable/tab_indicator_holo.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/app/src/main/org/runnerup/view/DetailActivity.java b/app/src/main/org/runnerup/view/DetailActivity.java index ebafdb5ed..5bc88496e 100644 --- a/app/src/main/org/runnerup/view/DetailActivity.java +++ b/app/src/main/org/runnerup/view/DetailActivity.java @@ -238,7 +238,7 @@ public int preSetValue(int newValue) throws IllegalArgumentException { if (BuildConfig.OSMDROID_ENABLED || BuildConfig.MAPBOX_ENABLED) { addDetailTab(org.runnerup.common.R.string.Map, R.id.tab_map); - mapTab = (View) detailTabs.getTabAt(2).getCustomView().getParent(); + mapTab = detailTabs.getTabAt(2).view; } addDetailTab(org.runnerup.common.R.string.Graph, R.id.tab_graph); @@ -378,9 +378,7 @@ private void updateViewForSport(int sportValue) { } private void addDetailTab(int titleId, int contentId) { - TabLayout.Tab tab = detailTabs.newTab(); - tab.setCustomView(WidgetUtil.createHoloTabIndicator(this, getString(titleId))); - detailTabs.addTab(tab); + detailTabs.addTab(detailTabs.newTab().setText(titleId)); tabContents.add(findViewById(contentId)); } diff --git a/app/src/main/org/runnerup/widget/WidgetUtil.java b/app/src/main/org/runnerup/widget/WidgetUtil.java index fab23b33a..96675cf65 100644 --- a/app/src/main/org/runnerup/widget/WidgetUtil.java +++ b/app/src/main/org/runnerup/widget/WidgetUtil.java @@ -17,16 +17,9 @@ package org.runnerup.widget; -import android.content.Context; -import android.graphics.drawable.Drawable; -import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.EditText; -import android.widget.TextView; -import androidx.appcompat.content.res.AppCompatResources; -import androidx.core.view.ViewCompat; -import org.runnerup.R; public class WidgetUtil { @@ -39,21 +32,6 @@ public static void setEditable(EditText editText, boolean onoff) { } } - public static View createHoloTabIndicator(Context ctx, String title) { - TextView txtTab = new TextView(ctx); - txtTab.setText(title); - // txtTab.setTextColor(Color.WHITE); - // txtTab.setGravity(Gravity.CENTER_HORIZONTAL); - Drawable drawable = AppCompatResources.getDrawable(ctx, R.drawable.tab_indicator_holo); - ViewCompat.setBackground(txtTab, drawable); - - int h = (25 * drawable.getIntrinsicHeight()) / 10; - txtTab.setPadding(0, h, 0, h); - // txtTab.setHeight(1 + 10 * drawable.getIntrinsicHeight()); - // txtTab.setLineSpacing(1 + 5 * drawable.getIntrinsicHeight(), 1); - return txtTab; - } - public static void addLegacyOverflowButton(Window window) { if (window.peekDecorView() == null) { return;