Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed app/res/drawable-mdpi/tab_selected_focused_holo.9.png
Binary file not shown.
Binary file removed app/res/drawable-mdpi/tab_selected_holo.9.png
Binary file not shown.
Binary file removed app/res/drawable-mdpi/tab_selected_pressed_holo.9.png
Binary file not shown.
Binary file removed app/res/drawable-mdpi/tab_unselected_focused_holo.9.png
Binary file not shown.
Binary file removed app/res/drawable-mdpi/tab_unselected_holo.9.png
Binary file not shown.
Binary file removed app/res/drawable-mdpi/tab_unselected_pressed_holo.9.png
Binary file not shown.
29 changes: 0 additions & 29 deletions app/res/drawable/tab_indicator_holo.xml

This file was deleted.

6 changes: 2 additions & 4 deletions app/src/main/org/runnerup/view/DetailActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
}

Expand Down
22 changes: 0 additions & 22 deletions app/src/main/org/runnerup/widget/WidgetUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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;
Expand Down
Loading