Make activity authrotiative of contentView and implement a basic Settings skelet
This commit is contained in:
@@ -18,6 +18,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
app = new AppController(this);
|
app = new AppController(this);
|
||||||
|
setContentView(R.layout.view_main);
|
||||||
app.init();
|
app.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,4 +29,11 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
public void logcat(String log) {
|
public void logcat(String log) {
|
||||||
Log.i("LogcatGeneric", log);
|
Log.i("LogcatGeneric", log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
if (!app.getUi().back()) {
|
||||||
|
super.onBackPressed(); // exits app
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import eu.konggdev.strikemaps.MainActivity;
|
|||||||
import eu.konggdev.strikemaps.R;
|
import eu.konggdev.strikemaps.R;
|
||||||
import eu.konggdev.strikemaps.map.MapComponent;
|
import eu.konggdev.strikemaps.map.MapComponent;
|
||||||
import eu.konggdev.strikemaps.ui.UIComponent;
|
import eu.konggdev.strikemaps.ui.UIComponent;
|
||||||
|
import eu.konggdev.strikemaps.ui.screen.definition.DefinedScreen;
|
||||||
|
|
||||||
import static android.content.Context.MODE_PRIVATE;
|
import static android.content.Context.MODE_PRIVATE;
|
||||||
public class AppController {
|
public class AppController {
|
||||||
@@ -39,7 +40,7 @@ public class AppController {
|
|||||||
if(map == null) map = new MapComponent(this);
|
if(map == null) map = new MapComponent(this);
|
||||||
if(ui == null) {
|
if(ui == null) {
|
||||||
ui = new UIComponent(this, map);
|
ui = new UIComponent(this, map);
|
||||||
ui.swapScreen(R.layout.screen_main); //Initial
|
ui.swapScreen(DefinedScreen.MAIN); //Initial
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,64 +3,74 @@ package eu.konggdev.strikemaps.ui;
|
|||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import com.google.common.collect.BiMap;
|
|
||||||
import eu.konggdev.strikemaps.Component;
|
import eu.konggdev.strikemaps.Component;
|
||||||
import eu.konggdev.strikemaps.R;
|
import eu.konggdev.strikemaps.R;
|
||||||
import eu.konggdev.strikemaps.app.AppController;
|
import eu.konggdev.strikemaps.app.AppController;
|
||||||
import eu.konggdev.strikemaps.map.MapComponent;
|
import eu.konggdev.strikemaps.map.MapComponent;
|
||||||
import eu.konggdev.strikemaps.ui.element.UIRegion;
|
import eu.konggdev.strikemaps.ui.element.region.content.MainContentRegion;
|
||||||
|
import eu.konggdev.strikemaps.ui.element.region.UIRegion;
|
||||||
import eu.konggdev.strikemaps.ui.fragment.layout.FragmentLayoutControls;
|
import eu.konggdev.strikemaps.ui.fragment.layout.FragmentLayoutControls;
|
||||||
|
import eu.konggdev.strikemaps.ui.fragment.layout.FragmentLayoutSearch;
|
||||||
import eu.konggdev.strikemaps.ui.fragment.layout.content.main.FragmentLayoutContentSettings;
|
import eu.konggdev.strikemaps.ui.fragment.layout.content.main.FragmentLayoutContentSettings;
|
||||||
import eu.konggdev.strikemaps.ui.screen.Screen;
|
import eu.konggdev.strikemaps.ui.screen.Screen;
|
||||||
|
import eu.konggdev.strikemaps.ui.screen.definition.DefinedScreen;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.ArrayDeque;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class UIComponent implements Component {
|
public class UIComponent implements Component {
|
||||||
@NonNull AppController app;
|
@NonNull AppController app;
|
||||||
private Map<Integer, Screen> screens;
|
MapComponent map;
|
||||||
private Integer currentScreen;
|
|
||||||
|
private final ArrayDeque<Screen> screenStack = new ArrayDeque<>();
|
||||||
|
|
||||||
public UIComponent(AppController app, MapComponent map) {
|
public UIComponent(AppController app, MapComponent map) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.screens = Map.of(
|
this.map = map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<DefinedScreen, Screen> getScreens(MapComponent map) {
|
||||||
|
return Map.of(
|
||||||
//Main screen
|
//Main screen
|
||||||
R.layout.screen_main, new Screen(
|
DefinedScreen.MAIN, new Screen(
|
||||||
//App reference
|
//App reference
|
||||||
app,
|
app,
|
||||||
//Map view
|
|
||||||
map.toFragment(), //FragmentLayoutContentMap
|
|
||||||
//Main screen init regions definition
|
//Main screen init regions definition
|
||||||
Map.of(R.id.bottomUi, new UIRegion(new FragmentLayoutControls(app, R.id.bottomUi), R.id.bottomUi)), //TODO: Probably stop referencing layout 3(!) times everytime
|
Map.of(
|
||||||
//Layout
|
R.id.mainContentView, new MainContentRegion(map.toFragment(), R.id.mainContentView),
|
||||||
R.layout.screen_main //TODO: Define this for the Screen without duplicating the reference
|
R.id.bottomUi, new UIRegion(new FragmentLayoutControls(app, R.id.bottomUi), R.id.bottomUi),
|
||||||
|
R.id.topUi, new UIRegion(new FragmentLayoutSearch(app, R.id.topUi), R.id.topUi)
|
||||||
|
) //TODO: Probably stop referencing layout 3(!) times everytime
|
||||||
),
|
),
|
||||||
//Settings screen
|
//Settings screen
|
||||||
R.layout.screen_settings, new Screen(
|
DefinedScreen.SETTINGS, new Screen(
|
||||||
app,
|
app,
|
||||||
//Settings
|
//Just the settings content fragment
|
||||||
new FragmentLayoutContentSettings(),
|
Map.of(
|
||||||
/* No regions defined in settings
|
R.id.mainContentView, new MainContentRegion(new FragmentLayoutContentSettings(), R.id.mainContentView)
|
||||||
Entire screen is just the main view */
|
)
|
||||||
new HashMap<>(),
|
|
||||||
//Layout
|
|
||||||
R.layout.screen_settings
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void swapScreen(Integer screen) {
|
public void swapScreen(DefinedScreen screenKey) {
|
||||||
currentScreen = screen;
|
if (!screenStack.isEmpty()) getCurrentScreen().detachAll();
|
||||||
|
screenStack.add(getScreens(map).get(screenKey));
|
||||||
getCurrentScreen().attachAll();
|
getCurrentScreen().attachAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Screen getCurrentScreen() {
|
public boolean back() {
|
||||||
return getScreen(currentScreen);
|
if (screenStack.size() <= 1) return false;
|
||||||
|
getCurrentScreen().detachAll();
|
||||||
|
|
||||||
|
screenStack.removeLast();
|
||||||
|
getCurrentScreen().attachAll();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Screen getScreen(Integer screen) {
|
public Screen getCurrentScreen() {
|
||||||
return screens.get(screen);
|
return screenStack.getLast();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void alert(AlertDialog dialog) {
|
public void alert(AlertDialog dialog) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package eu.konggdev.strikemaps.ui.element;
|
package eu.konggdev.strikemaps.ui.element.region;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
package eu.konggdev.strikemaps.ui.element;
|
package eu.konggdev.strikemaps.ui.element.region.content;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import eu.konggdev.strikemaps.ui.element.region.UIRegion;
|
||||||
|
|
||||||
public class MainContentRegion extends UIRegion {
|
public class MainContentRegion extends UIRegion {
|
||||||
public Fragment fragment;
|
public Fragment fragment;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import android.view.MotionEvent;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import eu.konggdev.strikemaps.ui.element.UIRegion;
|
|
||||||
|
|
||||||
public interface ContainerFragment {
|
public interface ContainerFragment {
|
||||||
abstract public Integer getRegion();
|
abstract public Integer getRegion();
|
||||||
|
|||||||
+48
-1
@@ -1,4 +1,51 @@
|
|||||||
package eu.konggdev.strikemaps.ui.fragment.layout;
|
package eu.konggdev.strikemaps.ui.fragment.layout;
|
||||||
|
|
||||||
public class FragmentLayoutSearch {
|
import android.Manifest;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import eu.konggdev.strikemaps.R;
|
||||||
|
import eu.konggdev.strikemaps.app.AppController;
|
||||||
|
import eu.konggdev.strikemaps.data.helper.UserPrefsHelper;
|
||||||
|
import eu.konggdev.strikemaps.map.overlay.implementation.LocationOverlay;
|
||||||
|
import eu.konggdev.strikemaps.ui.fragment.popup.FragmentMapChangePopup;
|
||||||
|
import eu.konggdev.strikemaps.ui.screen.definition.DefinedScreen;
|
||||||
|
|
||||||
|
public class FragmentLayoutSearch extends Fragment implements Layout {
|
||||||
|
AppController app;
|
||||||
|
View rootView;
|
||||||
|
|
||||||
|
private final Integer region;
|
||||||
|
|
||||||
|
public FragmentLayoutSearch(AppController app, Integer region) {
|
||||||
|
super(R.layout.fragment_search);
|
||||||
|
this.app = app;
|
||||||
|
this.region = region;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getRegion() {
|
||||||
|
return region;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Fragment toFragment() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
//TODO: Make a floating menu instead of going right in settings
|
||||||
|
setupButton(view, R.id.hamburgerButton, click(() -> app.getUi().swapScreen(DefinedScreen.SETTINGS)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -2,13 +2,11 @@ package eu.konggdev.strikemaps.ui.fragment.layout.content.main;
|
|||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
import eu.konggdev.strikemaps.ui.element.UIRegion;
|
|
||||||
|
|
||||||
import eu.konggdev.strikemaps.R;
|
import eu.konggdev.strikemaps.R;
|
||||||
|
|
||||||
public class FragmentLayoutContentMap extends Fragment implements MainContentLayout {
|
public class FragmentLayoutContentMap extends Fragment implements MainContentLayout {
|
||||||
@@ -28,6 +26,7 @@ public class FragmentLayoutContentMap extends Fragment implements MainContentLay
|
|||||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
LinearLayout layout = (LinearLayout) view;
|
LinearLayout layout = (LinearLayout) view;
|
||||||
|
if(mapView.getParent() != null) ((ViewGroup) mapView.getParent()).removeView(mapView);
|
||||||
layout.addView(mapView);
|
layout.addView(mapView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-1
@@ -1,4 +1,20 @@
|
|||||||
package eu.konggdev.strikemaps.ui.fragment.layout.content.main;
|
package eu.konggdev.strikemaps.ui.fragment.layout.content.main;
|
||||||
|
|
||||||
public class FragmentLayoutContentSettings {
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import eu.konggdev.strikemaps.R;
|
||||||
|
|
||||||
|
public class FragmentLayoutContentSettings extends Fragment implements MainContentLayout {
|
||||||
|
public FragmentLayoutContentSettings() {
|
||||||
|
super(R.layout.fragment_settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Fragment toFragment() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,27 +3,22 @@ package eu.konggdev.strikemaps.ui.screen;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import eu.konggdev.strikemaps.R;
|
|
||||||
import eu.konggdev.strikemaps.app.AppController;
|
import eu.konggdev.strikemaps.app.AppController;
|
||||||
import eu.konggdev.strikemaps.ui.fragment.ContainerFragment;
|
import eu.konggdev.strikemaps.ui.fragment.ContainerFragment;
|
||||||
|
import eu.konggdev.strikemaps.ui.fragment.FragmentEmptyPlaceholder;
|
||||||
import eu.konggdev.strikemaps.ui.fragment.layout.content.main.MainContentLayout;
|
import eu.konggdev.strikemaps.ui.fragment.layout.content.main.MainContentLayout;
|
||||||
import eu.konggdev.strikemaps.ui.fragment.popup.Popup;
|
import eu.konggdev.strikemaps.ui.fragment.popup.Popup;
|
||||||
import eu.konggdev.strikemaps.ui.element.UIRegion;
|
import eu.konggdev.strikemaps.ui.element.region.UIRegion;
|
||||||
|
|
||||||
public class Screen {
|
public class Screen {
|
||||||
@NonNull AppController app;
|
@NonNull AppController app;
|
||||||
public Screen(AppController app, MainContentLayout mainContent, Map<Integer, UIRegion> regions, Integer layout) {
|
public Screen(AppController app, Map<Integer, UIRegion> regions) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.layout = layout;
|
|
||||||
this.mainContent = mainContent;
|
|
||||||
this.uiRegions = regions;
|
this.uiRegions = regions;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Integer layout;
|
|
||||||
|
|
||||||
private MainContentLayout mainContent;
|
private MainContentLayout mainContent;
|
||||||
|
|
||||||
Map<Integer, UIRegion> uiRegions;
|
Map<Integer, UIRegion> uiRegions;
|
||||||
@@ -68,10 +63,10 @@ public class Screen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void attachAll() {
|
public void attachAll() {
|
||||||
app.getActivity().setContentView(layout);
|
for (UIRegion region : uiRegions.values()) setFragment(region, region.getFragment());
|
||||||
fragmentTransaction(R.id.mainContentView, mainContent.toFragment());
|
}
|
||||||
for (UIRegion region : uiRegions.values()) {
|
|
||||||
setFragment(region, region.getFragment());
|
public void detachAll() {
|
||||||
}
|
for (UIRegion region : uiRegions.values()) fragmentTransaction(region.layoutId, new FragmentEmptyPlaceholder());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
package eu.konggdev.strikemaps.ui.screen.definition;
|
package eu.konggdev.strikemaps.ui.screen.definition;
|
||||||
public enum DefinedScreens {
|
public enum DefinedScreen {
|
||||||
MAIN,
|
MAIN,
|
||||||
SETTINGS
|
SETTINGS
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,39 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:padding="24dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/searchContainer"
|
||||||
|
android:layout_width="290dp"
|
||||||
|
android:layout_height="33dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="#000000"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<SearchView
|
||||||
|
android:id="@+id/searchView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:iconifiedByDefault="false"
|
||||||
|
android:queryHint="Search..."
|
||||||
|
android:background="@android:color/transparent" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/hamburgerButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:contentDescription="Menu"
|
||||||
|
android:src="@drawable/ic_hamburger_menu" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -7,14 +7,13 @@
|
|||||||
android:padding="24dp"
|
android:padding="24dp"
|
||||||
android:background="@android:color/background_dark">
|
android:background="@android:color/background_dark">
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/devIndicator"
|
android:id="@+id/settingsBanner"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="DEVELOPMENT BUILD!"
|
android:text="Settings"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="13sp"
|
android:textSize="21sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/constraintLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools" >
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/popupHolder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/mainContentView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" >
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/bottomUi"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/devIndicator"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="DEVELOPMENT BUILD!"
|
|
||||||
android:textColor="#000000"
|
|
||||||
android:textSize="13sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/searchContainer"
|
|
||||||
android:layout_width="280dp"
|
|
||||||
android:layout_height="33dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:background="#000000"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
|
||||||
|
|
||||||
<SearchView
|
|
||||||
android:id="@+id/searchView"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:iconifiedByDefault="false"
|
|
||||||
android:queryHint="Search..."
|
|
||||||
android:background="@android:color/transparent" />
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/hamburgerButton"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:contentDescription="Menu"
|
|
||||||
android:src="@drawable/ic_hamburger_menu" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -25,28 +25,17 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintHorizontal_bias="0.0" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/topUi"
|
android:id="@+id/topUi"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="4dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0" />
|
app:layout_constraintHorizontal_bias="0.0" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/devIndicator"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="DEVELOPMENT BUILD! (MAP)"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="13sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user