Skip to content

Commit f368a1f

Browse files
committed
fix: wrong panels being loaded in lite version
1 parent ebc727f commit f368a1f

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

app/src/main/java/app/simple/positional/adapters/bottombar/BottomBarItems.java

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import app.simple.positional.constants.LocationPins;
1111
import app.simple.positional.model.BottomBar;
1212
import app.simple.positional.ui.panels.Measure;
13+
import app.simple.positional.util.AppUtils;
1314

1415
public class BottomBarItems {
1516

@@ -25,14 +26,24 @@ public class BottomBarItems {
2526
public static ArrayList<BottomBar> getBottomBarItems(Context context) {
2627
ArrayList<BottomBar> list = new ArrayList<>();
2728

28-
list.add(new BottomBar(R.drawable.ic_clock, CLOCK, context.getString(R.string.clock), ContextCompat.getColor(context, R.color.time_bb_color)));
29-
list.add(new BottomBar(R.drawable.ic_compass, COMPASS, context.getString(R.string.compass), ContextCompat.getColor(context, R.color.compass_bb_color)));
30-
list.add(new BottomBar(R.drawable.ic_near_me, DIRECTION, context.getString(R.string.direction), ContextCompat.getColor(context, R.color.direction_bb_color)));
31-
list.add(new BottomBar(LocationPins.INSTANCE.getLocationPin(), LOCATION, context.getString(R.string.gps_location), ContextCompat.getColor(context, R.color.location_bb_color)));
32-
list.add(new BottomBar(R.drawable.ic_trail_line, TRAIL, context.getString(R.string.trail), ContextCompat.getColor(context, R.color.trail_bb_color)));
33-
list.add(new BottomBar(R.drawable.ic_square_foot, MEASURE, context.getString(R.string.measure), ContextCompat.getColor(context, R.color.measure_bb_color)));
34-
list.add(new BottomBar(R.drawable.ic_level, LEVEL, context.getString(R.string.level), ContextCompat.getColor(context, R.color.level_bb_color)));
35-
list.add(new BottomBar(R.drawable.ic_settings, SETTINGS, context.getString(R.string.settings), ContextCompat.getColor(context, R.color.settings_bb_color)));
29+
if (AppUtils.INSTANCE.isFullFlavor()) {
30+
list.add(new BottomBar(R.drawable.ic_clock, CLOCK, context.getString(R.string.clock), ContextCompat.getColor(context, R.color.time_bb_color)));
31+
list.add(new BottomBar(R.drawable.ic_compass, COMPASS, context.getString(R.string.compass), ContextCompat.getColor(context, R.color.compass_bb_color)));
32+
list.add(new BottomBar(R.drawable.ic_near_me, DIRECTION, context.getString(R.string.direction), ContextCompat.getColor(context, R.color.direction_bb_color)));
33+
list.add(new BottomBar(LocationPins.INSTANCE.getLocationPin(), LOCATION, context.getString(R.string.gps_location), ContextCompat.getColor(context, R.color.location_bb_color)));
34+
list.add(new BottomBar(R.drawable.ic_trail_line, TRAIL, context.getString(R.string.trail), ContextCompat.getColor(context, R.color.trail_bb_color)));
35+
list.add(new BottomBar(R.drawable.ic_square_foot, MEASURE, context.getString(R.string.measure), ContextCompat.getColor(context, R.color.measure_bb_color)));
36+
list.add(new BottomBar(R.drawable.ic_level, LEVEL, context.getString(R.string.level), ContextCompat.getColor(context, R.color.level_bb_color)));
37+
list.add(new BottomBar(R.drawable.ic_settings, SETTINGS, context.getString(R.string.settings), ContextCompat.getColor(context, R.color.settings_bb_color)));
38+
} else {
39+
list.add(new BottomBar(R.drawable.ic_clock, CLOCK, context.getString(R.string.clock), ContextCompat.getColor(context, R.color.time_bb_color)));
40+
list.add(new BottomBar(R.drawable.ic_compass, COMPASS, context.getString(R.string.compass), ContextCompat.getColor(context, R.color.compass_bb_color)));
41+
list.add(new BottomBar(R.drawable.ic_near_me, DIRECTION, context.getString(R.string.direction), ContextCompat.getColor(context, R.color.direction_bb_color)));
42+
list.add(new BottomBar(LocationPins.INSTANCE.getLocationPin(), LOCATION, context.getString(R.string.gps_location), ContextCompat.getColor(context, R.color.location_bb_color)));
43+
list.add(new BottomBar(R.drawable.ic_trail_line, TRAIL, context.getString(R.string.trail), ContextCompat.getColor(context, R.color.trail_bb_color)));
44+
list.add(new BottomBar(R.drawable.ic_level, LEVEL, context.getString(R.string.level), ContextCompat.getColor(context, R.color.level_bb_color)));
45+
list.add(new BottomBar(R.drawable.ic_settings, SETTINGS, context.getString(R.string.settings), ContextCompat.getColor(context, R.color.settings_bb_color)));
46+
}
3647

3748
return list;
3849
}

0 commit comments

Comments
 (0)