From 3c6b065f50e62d4d1f62a3f123db93b70472afc6 Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Sun, 24 Jan 2021 23:36:55 +0200 Subject: [PATCH] null exeption fix --- .../res/layout/gpx_list_item_tab_content.xml | 2 +- OsmAnd/src/net/osmand/plus/UiUtilities.java | 64 +++++++++++++------ .../plus/myplaces/GPXItemPagerAdapter.java | 2 +- .../plus/myplaces/SegmentGPXAdapter.java | 8 +-- 4 files changed, 47 insertions(+), 29 deletions(-) diff --git a/OsmAnd/res/layout/gpx_list_item_tab_content.xml b/OsmAnd/res/layout/gpx_list_item_tab_content.xml index fbe7bf5e1c..d2ce779b8b 100644 --- a/OsmAnd/res/layout/gpx_list_item_tab_content.xml +++ b/OsmAnd/res/layout/gpx_list_item_tab_content.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - + { PagerSlidingTabStrip tabLayout = row.findViewById(R.id.sliding_tabs); tabLayout.setTabBackground(R.color.color_transparent); - tabLayout.setIndicatorColorResource(nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light); - tabLayout.setIndicatorBgColorResource(nightMode ? R.color.divider_color_dark : R.color.divider_color_light); - tabLayout.setIndicatorHeight(AndroidUtils.dpToPx(context, 1f)); - if (!nightMode) { - tabLayout.setTextColor(tabLayout.getIndicatorColor()); - tabLayout.setTabInactiveTextColor(ContextCompat.getColor(row.getContext(), R.color.text_color_secondary_light)); - } + tabLayout.setIndicatorHeight(AndroidUtils.dpToPx(context, 0)); tabLayout.setTextSize(AndroidUtils.spToPx(context, 12f)); tabLayout.setShouldExpand(true); WrapContentHeightViewPager pager = row.findViewById(R.id.pager);