From 65b8ab961e6678dc720de7f585b25fbe3b5e2ddc Mon Sep 17 00:00:00 2001 From: mirkia Date: Wed, 24 Apr 2019 20:04:10 +0430 Subject: [PATCH] SearchActivity added --- app/build.gradle | 4 +- app/src/main/AndroidManifest.xml | 1 + .../sample/starter/DashboardActivity.java | 6 + .../sample/starter/activity/APIOkHttp.java | 1 - .../sample/starter/activity/APIRetrofit.java | 2 +- .../sample/starter/activity/APIVolley.java | 9 +- .../sample/starter/activity/Search.java | 243 ++++++++++++++++++ .../sample/starter/adapter/SearchAdapter.java | 79 ++++++ .../model/{ => address}/NeshanAddress.java | 2 +- .../sample/starter/model/search/Item.java | 68 +++++ .../sample/starter/model/search/Location.java | 23 ++ .../starter/model/search/NeshanSearch.java | 26 ++ .../starter/network/GetDataService.java | 8 +- app/src/main/res/drawable/center_marker.png | Bin 0 -> 1684 bytes .../main/res/drawable/edit_text_search_bg.xml | 12 + app/src/main/res/drawable/ic_list_search.xml | 9 + app/src/main/res/drawable/ic_location.xml | 4 + app/src/main/res/drawable/ic_marker.png | Bin 8175 -> 1517 bytes .../{ic_marker_2.xml => ic_marker_two.xml} | 0 app/src/main/res/drawable/ic_search.xml | 5 + .../main/res/layout/activity_dashboard.xml | 57 +++- app/src/main/res/layout/activity_search.xml | 71 +++++ app/src/main/res/layout/item_search.xml | 61 +++++ app/src/main/res/raw/neshan.license | 38 +-- app/src/main/res/values/styles.xml | 1 + 25 files changed, 691 insertions(+), 39 deletions(-) create mode 100644 app/src/main/java/org/neshan/sample/starter/activity/Search.java create mode 100644 app/src/main/java/org/neshan/sample/starter/adapter/SearchAdapter.java rename app/src/main/java/org/neshan/sample/starter/model/{ => address}/NeshanAddress.java (98%) create mode 100644 app/src/main/java/org/neshan/sample/starter/model/search/Item.java create mode 100644 app/src/main/java/org/neshan/sample/starter/model/search/Location.java create mode 100644 app/src/main/java/org/neshan/sample/starter/model/search/NeshanSearch.java create mode 100644 app/src/main/res/drawable/center_marker.png create mode 100644 app/src/main/res/drawable/edit_text_search_bg.xml create mode 100644 app/src/main/res/drawable/ic_list_search.xml create mode 100644 app/src/main/res/drawable/ic_location.xml rename app/src/main/res/drawable/{ic_marker_2.xml => ic_marker_two.xml} (100%) create mode 100644 app/src/main/res/drawable/ic_search.xml create mode 100644 app/src/main/res/layout/activity_search.xml create mode 100644 app/src/main/res/layout/item_search.xml diff --git a/app/build.gradle b/app/build.gradle index 6c2ef0b..47e7564 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,8 +5,8 @@ android { defaultConfig { applicationId "org.neshan.sample.starter.v2" minSdkVersion 19 - versionCode 3 - versionName "2.0.1" + versionCode 4 + versionName "2.1.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" // ndk { // abiFilters 'armeabi-v7a' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4172e45..125c141 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,6 +14,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> + items; + private SearchAdapter adapter; + + // map UI element + private MapView map; + private VectorElementLayer markerLayer; + private VectorElementLayer centerMarkerLayer; + private Marker centerMarker; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_search); + // everything related to ui is initialized here + initLayoutReferences(); + } + + // Initializing layout references (views, map and map events) + private void initLayoutReferences() { + // Initializing views + initViews(); + // Initializing mapView element + initMap(); + + //listen for search text change + editText.addTextChangedListener(new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + + } + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { + } + + @Override + public void afterTextChanged(Editable s) { + + search(s.toString()); + Log.i(TAG, "afterTextChanged: " + s.toString()); + } + }); + + } + + // We use findViewByID for every element in our layout file here + private void initViews() { + map = findViewById(R.id.map); + editText = findViewById(R.id.search_editText); + recyclerView = findViewById(R.id.recyclerView); + items = new ArrayList<>(); + adapter = new SearchAdapter(items, this); + recyclerView.setLayoutManager(new LinearLayoutManager(this)); + recyclerView.setAdapter(adapter); + } + + + private void initMap() { + // add Standard_day map to layer BASE_MAP_INDEX + map.getOptions().setZoomRange(new Range(4.5f, 18f)); + map.getLayers().insert(BASE_MAP_INDEX, NeshanServices.createBaseMap(NeshanMapStyle.STANDARD_DAY)); + + // Creating a VectorElementLayer(called markerLayer) to add all markers to it and adding it to map's layers + markerLayer = NeshanServices.createVectorElementLayer(); + centerMarkerLayer = NeshanServices.createVectorElementLayer(); + map.getLayers().add(markerLayer); + map.getLayers().add(centerMarkerLayer); + + // Setting map focal position to a fixed position and setting camera zoom + LngLat lngLat = new LngLat(51.330743, 35.767234); + map.setFocalPointPosition(lngLat, 0); + map.setZoom(14f, 0); + centerMarker = new Marker(lngLat, getCenterMarkerStyle()); + centerMarkerLayer.add(centerMarker); + + } + + private void search(String term) { + final double lat = map.getFocalPointPosition().getY(); + final double lng = map.getFocalPointPosition().getX(); + final String requestURL = "https://api.neshan.org/v1/search?term=" + term + "&lat=" + lat + "&lng=" + lng; + + GetDataService api = RetrofitClientInstance.getRetrofitInstance().create(GetDataService.class); + Call call = api.getNeshanSearch(requestURL); + + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + if (response.isSuccessful()) { + NeshanSearch neshanSearch = response.body(); + items = neshanSearch.getItems(); + adapter.updateList(items); + addCenterMarker(new LngLat(lng , lat)); + } else { + Log.i(TAG, "onResponse: " + response.code() + " " + response.message()); + Toast.makeText(Search.this, "خطا در برقراری ارتباط!", Toast.LENGTH_SHORT).show(); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + Log.i(TAG, "onFailure: " + t.getMessage()); + Toast.makeText(Search.this, "ارتباط برقرار نشد!", Toast.LENGTH_SHORT).show(); + } + }); + + } + + private void addCenterMarker(LngLat lngLat) { + centerMarker.setPos(lngLat); + } + + private MarkerStyle getCenterMarkerStyle() { + MarkerStyleCreator styleCreator = new MarkerStyleCreator(); + styleCreator.setSize(50); + styleCreator.setBitmap + (BitmapUtils.createBitmapFromAndroidBitmap + (BitmapFactory.decodeResource(getResources(), R.drawable.center_marker))); + return styleCreator.buildStyle(); + } + + + private void addMarker(LngLat lngLat, float size) { + Marker marker = new Marker(lngLat, getMarkerStyle(size)); + markerLayer.add(marker); + } + + private MarkerStyle getMarkerStyle(float size) { + MarkerStyleCreator styleCreator = new MarkerStyleCreator(); + styleCreator.setSize(size); + styleCreator.setBitmap + (BitmapUtils.createBitmapFromAndroidBitmap + (BitmapFactory.decodeResource(getResources(), R.drawable.ic_marker))); + return styleCreator.buildStyle(); + } + + private void closeKeyBoard() { + InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE); + if (getCurrentFocus() != null) { + imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); + } + } + + + public void showSearchClick(View view) { + closeKeyBoard(); + adapter.updateList(items); + markerLayer.clear(); + } + + public void showMarkersClick(View view) { + adapter.updateList(new ArrayList()); + closeKeyBoard(); + markerLayer.clear(); + double minLat = Double.MAX_VALUE; + double minLng = Double.MAX_VALUE; + double maxLat = Double.MIN_VALUE; + double maxLng = Double.MIN_VALUE; + for (Item item : items) { + Location location = item.getLocation(); + LngLat lngLat = new LngLat(location.getX(), location.getY()); + addMarker(lngLat, 15f); + minLat = Math.min(lngLat.getY(), minLat); + minLng = Math.min(lngLat.getX(), minLng); + maxLat = Math.max(lngLat.getY(), maxLat); + maxLng = Math.max(lngLat.getX(), maxLng); + } + + if (items.size() > 0) { + map.moveToCameraBounds(new Bounds(new LngLat(minLng, minLat), new LngLat(maxLng, maxLat)), + new ViewportBounds(new ViewportPosition(0, 0), new ViewportPosition(map.getWidth(), map.getHeight())), + true, 0.5f); + } + + + } + + @Override + public void onSeachItemClick(LngLat lngLat) { + closeKeyBoard(); + markerLayer.clear(); + adapter.updateList(new ArrayList()); + map.setFocalPointPosition(lngLat, 0); + map.setZoom(16f, 0); + addMarker(lngLat, 30f); + + } +} diff --git a/app/src/main/java/org/neshan/sample/starter/adapter/SearchAdapter.java b/app/src/main/java/org/neshan/sample/starter/adapter/SearchAdapter.java new file mode 100644 index 0000000..f114529 --- /dev/null +++ b/app/src/main/java/org/neshan/sample/starter/adapter/SearchAdapter.java @@ -0,0 +1,79 @@ +package org.neshan.sample.starter.adapter; + + +import android.support.annotation.NonNull; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import org.neshan.core.LngLat; +import org.neshan.sample.starter.R; +import org.neshan.sample.starter.model.search.Item; +import org.neshan.sample.starter.model.search.Location; + +import java.util.List; + +public class SearchAdapter extends RecyclerView.Adapter { + + + private List items; + private OnSearchItemListener onSearchItemListener; + + public SearchAdapter(List items , OnSearchItemListener onSearchItemListener) { + this.items = items; + this.onSearchItemListener = onSearchItemListener; + } + + @NonNull + @Override + public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_search , parent , false); + return new ViewHolder(view); + } + + @Override + public void onBindViewHolder(@NonNull ViewHolder holder, int position) { + holder.tvTitle.setText(items.get(position).getTitle()); + holder.tvAddress.setText(items.get(position).getAddress()); + } + + @Override + public int getItemCount() { + return items.size(); + } + + + + + public void updateList(List items){ + this.items = items; + notifyDataSetChanged(); + } + + public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { + + private TextView tvTitle; + private TextView tvAddress; + + public ViewHolder(@NonNull View itemView) { + super(itemView); + tvTitle = itemView.findViewById(R.id.textView_title); + tvAddress = itemView.findViewById(R.id.textView_address); + + itemView.setOnClickListener(this); + } + + @Override + public void onClick(View v) { + Location location = items.get(getAdapterPosition()).getLocation(); + LngLat lngLat = new LngLat(location.getX() , location.getY()); + onSearchItemListener.onSeachItemClick(lngLat); + } + } + + public interface OnSearchItemListener{ + void onSeachItemClick(LngLat lngLat); + } +} diff --git a/app/src/main/java/org/neshan/sample/starter/model/NeshanAddress.java b/app/src/main/java/org/neshan/sample/starter/model/address/NeshanAddress.java similarity index 98% rename from app/src/main/java/org/neshan/sample/starter/model/NeshanAddress.java rename to app/src/main/java/org/neshan/sample/starter/model/address/NeshanAddress.java index 485bf2d..a6740cb 100644 --- a/app/src/main/java/org/neshan/sample/starter/model/NeshanAddress.java +++ b/app/src/main/java/org/neshan/sample/starter/model/address/NeshanAddress.java @@ -1,4 +1,4 @@ -package org.neshan.sample.starter.model; +package org.neshan.sample.starter.model.address; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/org/neshan/sample/starter/model/search/Item.java b/app/src/main/java/org/neshan/sample/starter/model/search/Item.java new file mode 100644 index 0000000..504e564 --- /dev/null +++ b/app/src/main/java/org/neshan/sample/starter/model/search/Item.java @@ -0,0 +1,68 @@ +package org.neshan.sample.starter.model.search; + +public class Item { + + private String title; + private String address; + private String neighbourhood; + private String region; + private String type; + private String category; + private Location location; + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getNeighbourhood() { + return neighbourhood; + } + + public void setNeighbourhood(String neighbourhood) { + this.neighbourhood = neighbourhood; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public Location getLocation() { + return location; + } + + public void setLocation(Location location) { + this.location = location; + } +} diff --git a/app/src/main/java/org/neshan/sample/starter/model/search/Location.java b/app/src/main/java/org/neshan/sample/starter/model/search/Location.java new file mode 100644 index 0000000..45c4407 --- /dev/null +++ b/app/src/main/java/org/neshan/sample/starter/model/search/Location.java @@ -0,0 +1,23 @@ +package org.neshan.sample.starter.model.search; + +public class Location { + + private Double x; + private Double y; + + public Double getX() { + return x; + } + + public void setX(Double x) { + this.x = x; + } + + public Double getY() { + return y; + } + + public void setY(Double y) { + this.y = y; + } +} diff --git a/app/src/main/java/org/neshan/sample/starter/model/search/NeshanSearch.java b/app/src/main/java/org/neshan/sample/starter/model/search/NeshanSearch.java new file mode 100644 index 0000000..9be4db4 --- /dev/null +++ b/app/src/main/java/org/neshan/sample/starter/model/search/NeshanSearch.java @@ -0,0 +1,26 @@ +package org.neshan.sample.starter.model.search; + + +import java.util.List; + +public class NeshanSearch { + + private Integer count; + private List items ; + + public Integer getCount() { + return count; + } + + public void setCount(Integer count) { + this.count = count; + } + + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } +} diff --git a/app/src/main/java/org/neshan/sample/starter/network/GetDataService.java b/app/src/main/java/org/neshan/sample/starter/network/GetDataService.java index d0b33c9..c03e3ef 100644 --- a/app/src/main/java/org/neshan/sample/starter/network/GetDataService.java +++ b/app/src/main/java/org/neshan/sample/starter/network/GetDataService.java @@ -1,6 +1,7 @@ package org.neshan.sample.starter.network; -import org.neshan.sample.starter.model.NeshanAddress; +import org.neshan.sample.starter.model.address.NeshanAddress; +import org.neshan.sample.starter.model.search.NeshanSearch; import retrofit2.Call; import retrofit2.http.GET; @@ -13,4 +14,9 @@ public interface GetDataService { @Headers("Api-Key: service.kREahwU7lND32ygT9ZgPFXbwjzzKukdObRZsnUAJ") @GET Call getNeshanAddress(@Url String url); + + + @Headers("Api-Key: service.PnRV9ocd8zm9QYYlJUNLJoAihE3hfy34WUZ6jcjr") + @GET + Call getNeshanSearch(@Url String url); } \ No newline at end of file diff --git a/app/src/main/res/drawable/center_marker.png b/app/src/main/res/drawable/center_marker.png new file mode 100644 index 0000000000000000000000000000000000000000..d761b6d364e1faa4cd99e9f7ea167b1f9afdde29 GIT binary patch literal 1684 zcmY*Y3pCVO82_haP)*FsO!Al+jA4b+LpF>zGh;lDXq9S|^{C7oDik((wAEQOi%vA7 zL8_rV=hbAlNGKIjSv{N;Gb5QcDV4o{sy+KZ_kQ=gzwh_`zVF`izxgbt&vHG29t1(l z{d_%x!RiK2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lwOQ720z<{Re2*c!gms1V6!$Tts<{%n=pe@-PhSG@x*+67+QwwEvF9l1r8E-peYdv04Wb)D7f|oL+ zpY88ql{koK>S>Ij^c}zdBHt3K?t=8JnMJ(e?XaCp~_^^*V*x%uY(#eR4aVK+dKk8ww*1k}l+# zG`DTu6~`4i$e!bds%Fgz-D3lmgUErO-<@LKmYMsz%rZNDf|TB|H11?1t7gLvO&RKa z&eQntnQ70~zg(}zYBCSM>7^vq1st5YovhfdixkNZoMf5X_E=EUG$+|x5GYZj{U?;f zrzGv&*`pa5w%rrDUirSctV8#L714SaAF};Ti(-?bG5M*q9;YSaw2@nZnztnWZ>P5L z-|}3`_0MhVMmr;2--P{8ua+2i_y(=f(6C(RO723+(L^mH+?% literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/edit_text_search_bg.xml b/app/src/main/res/drawable/edit_text_search_bg.xml new file mode 100644 index 0000000..92148a9 --- /dev/null +++ b/app/src/main/res/drawable/edit_text_search_bg.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_list_search.xml b/app/src/main/res/drawable/ic_list_search.xml new file mode 100644 index 0000000..d6a308e --- /dev/null +++ b/app/src/main/res/drawable/ic_list_search.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/ic_location.xml b/app/src/main/res/drawable/ic_location.xml new file mode 100644 index 0000000..1639337 --- /dev/null +++ b/app/src/main/res/drawable/ic_location.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_marker.png b/app/src/main/res/drawable/ic_marker.png index a719ef95ea52d0c6f94532d2b518745b91192842..9feb6a083a6448df243896de141ff1acd503b541 100644 GIT binary patch literal 1517 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+0812aQ_Plzi}!F5LU8w~0< zST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y9no{vKQXF#&~Q3C + + + diff --git a/app/src/main/res/layout/activity_dashboard.xml b/app/src/main/res/layout/activity_dashboard.xml index 66d8279..7325a92 100644 --- a/app/src/main/res/layout/activity_dashboard.xml +++ b/app/src/main/res/layout/activity_dashboard.xml @@ -131,7 +131,7 @@ android:layout_width="match_parent" android:layout_height="50dp" android:adjustViewBounds="true" - app:srcCompat="@drawable/ic_marker_2" + app:srcCompat="@drawable/ic_marker_two" android:layout_marginTop="8dp"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/item_search.xml b/app/src/main/res/layout/item_search.xml new file mode 100644 index 0000000..b1702a9 --- /dev/null +++ b/app/src/main/res/layout/item_search.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/raw/neshan.license b/app/src/main/res/raw/neshan.license index 7c025d1..30eb7cd 100644 --- a/app/src/main/res/raw/neshan.license +++ b/app/src/main/res/raw/neshan.license @@ -1,23 +1,25 @@ -30608MCwCFD454qTamG+036rCgQLRUqa45S -eeAhQuGaBcu4q6yyqeM6u60KdFucjUNQ==N +30608MCwCFAKBNbk/ADwVHstNE96MRfmgST +JxAhQOnQzHAf7NqRIYEKFW0B8bpfOJiw==N k0fHQIDD1MvNRURCEBbRgIBBE1VS1BfVVoX FRZDUDkKARkAFAoCcEMPFB4WDglDQktBQFB -YU00UDxsNBgAoXktHWABYFH0DXVIMVlZWV1 -dcEwcOCwANVwRaVlIGLwwQElhQQwxoEgUGA +YU00UDxsCDAl0XEsQU1BYRi5SCFBfU1EHVV +sPQQgBVlMEUw0MAlJQeQ1EQQAEQwxoEgUGA wkEHRJMU3sSDQsCdg8NfQwFCA5aRkUnVVBi eyJbUV5bUiYgW18YBwxwdAx1cX8HAxNhTTB GVlBVFHhXLVJaVVgiJFdQEgMOdXNyAHYMAQ -IHeFc1NSUgIhRyVi9DME5DCAgNDE5DXHpYU -lkXA08WRDgGF1kRBxNUaFtOVglRUlcHXVoN -Ag0ADhkCBAADGVN7XkRZUwcFEXkCVVdbVFN -XQ0JLR1VXVkRVQlpLGVpQIApRTkMFDUE5Ek -wOHwVPFgAEBEFeF11TR15UVxpVQSRBEQESD -w9FORJCEggQFw0CC0dsWVpWWEdTZlxGQlgu -ClFYQwEETi8TDRUCEEwNEUxTAgMIHQQAGAc -KAxoAe1hRWEMBBE4vEw0VAhBMEgQcGklfVx -EMFkAEGxgWUj8KEgAESwBUaFtOU11TWUlQX -0QRCG0CBA4EAQMBAh9+WUNWTUQGRSQEHgAZ -DRNJCQEaVBIDEWVmYHZwBwMcHiYnMVBQVAI -3TU4RDAEKBQYLJ0FdXBEMFllHXhpaVD4HEh -pPFQBNOg0JTx4WABYVCxsORgsRGhZCTElRF -gtvDh0QEwkIRGgc +IHeFc1NSUgIhRyVi9DQUBZJSJbWRAFCHdwD +XBwCnUMBnQuMkVTIFkVfFZeJy8mUyVRWlFh +dnwBFGkaF1VdV1QjHBY9DwAOAnAaThQYCwV +JEQ8bVBIDEVIMVQdcBgQEYAwXEFFLVUUpWE +FZDlMDSVkKXxQEX1JSUQcNDxYYEyoKHRETB +xVPOEwCAAAHQ15DDQVBQ0oTWUZRG0tVXlws +AV0aBBUJQSRPDREETAMREgcHRUNKHUVRREN +QV1EfAQYQEQ8VBHMvExoIDgdDSEMJDE5VS1 +JCW0QYUEQWC29cQlpTUk8SeVZCUFtVQ0hDC +QxOVUtSQltEGE9RRkIkAB1WW0QXEWhNTgIf +BwAQBEMIVBIDEQQEBwwUBAAcf1snRVFcVBl +wU1lPVFJZRk1MDkVeXEFXQFlHFFxbQjlNSV +YyNDdjA1JbTD4rNSFQWFwCTRURRlVVXlhTU +X8sAhZWW0QOUi1PAgQeCgAKTx0ITUBVVhhH +QlRLQFFDYxlBVk1EFVk6BE5bTwMPABMBAEQ +SRA== diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 8b7a3ff..7e99c25 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -4,6 +4,7 @@