7 Commits
3.4.5 ... 3.4.6

Author SHA1 Message Date
antonio
9c6981ed19 gradle: bump up code version 2023-07-18 12:45:03 +02:00
antonio
560ac2df68 fix: fixed search functionality 2023-07-18 10:37:17 +02:00
antonio
260e6e9daa style: temp - icon splash 2023-07-17 11:11:12 +02:00
antonio
38a1368c76 style: icon toolbar 2023-07-17 11:10:56 +02:00
antonio
9bf3139bd2 style: icon launcher 2023-07-17 11:10:44 +02:00
antonio
d389d1d62a style: icon launcher 2023-07-17 11:10:06 +02:00
antonio
e60c0e312c fix: null checking 2023-07-17 10:55:40 +02:00
29 changed files with 448 additions and 16 deletions

View File

@@ -28,8 +28,8 @@ android {
tempo { tempo {
dimension "default" dimension "default"
applicationId 'com.cappielloantonio.tempo' applicationId 'com.cappielloantonio.tempo'
versionCode 12 versionCode 13
versionName '3.4.5' versionName '3.4.6'
} }
notquitemy { notquitemy {

View File

@@ -12,7 +12,7 @@ import java.util.List;
@Dao @Dao
public interface RecentSearchDao { public interface RecentSearchDao {
@Query("SELECT * FROM recent_search ORDER BY search ASC") @Query("SELECT * FROM recent_search ORDER BY search DESC")
List<String> getRecent(); List<String> getRecent();
@Insert(onConflict = OnConflictStrategy.REPLACE) @Insert(onConflict = OnConflictStrategy.REPLACE)

View File

@@ -1,5 +1,7 @@
package com.cappielloantonio.tempo.repository; package com.cappielloantonio.tempo.repository;
import android.util.Log;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;
@@ -100,6 +102,8 @@ public class SearchingRepository {
LinkedHashSet<String> hashSet = new LinkedHashSet<>(newSuggestions); LinkedHashSet<String> hashSet = new LinkedHashSet<>(newSuggestions);
ArrayList<String> suggestionsWithoutDuplicates = new ArrayList<>(hashSet); ArrayList<String> suggestionsWithoutDuplicates = new ArrayList<>(hashSet);
Log.d("suggestionsWithoutDuplicates", suggestionsWithoutDuplicates.toString());
suggestions.setValue(suggestionsWithoutDuplicates); suggestions.setValue(suggestionsWithoutDuplicates);
} }
} }

View File

@@ -76,7 +76,7 @@ public class SongHorizontalAdapter extends RecyclerView.Adapter<SongHorizontalAd
} }
public void setItems(List<Child> songs) { public void setItems(List<Child> songs) {
this.songs = songs; this.songs = songs != null ? songs : Collections.emptyList();
notifyDataSetChanged(); notifyDataSetChanged();
} }

View File

@@ -4,6 +4,7 @@ import android.content.ComponentName;
import android.os.Bundle; import android.os.Bundle;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@@ -121,17 +122,11 @@ public class SearchFragment extends Fragment implements ClickCallback {
bind.searchView bind.searchView
.getEditText() .getEditText()
.setOnEditorActionListener((textView, actionId, keyEvent) -> { .setOnEditorActionListener((textView, actionId, keyEvent) -> {
String query = bind.searchView.getText().toString(); String query = bind.searchView.getText().toString();
if (actionId == EditorInfo.IME_ACTION_DONE) { if (isQueryValid(query)) {
if (isQueryValid(query)) { search(query);
search(bind.searchView.getText().toString()); return true;
return true;
} else {
Toast.makeText(requireContext(), getString(R.string.search_info_minimum_characters), Toast.LENGTH_SHORT).show();
return false;
}
} }
return false; return false;
@@ -147,7 +142,7 @@ public class SearchFragment extends Fragment implements ClickCallback {
@Override @Override
public void onTextChanged(CharSequence charSequence, int start, int before, int count) { public void onTextChanged(CharSequence charSequence, int start, int before, int count) {
if (count > 1) { if (start + count > 1) {
setSearchSuggestions(charSequence.toString()); setSearchSuggestions(charSequence.toString());
} else { } else {
setRecentSuggestions(); setRecentSuggestions();
@@ -247,6 +242,7 @@ public class SearchFragment extends Fragment implements ClickCallback {
} }
private boolean isQueryValid(String query) { private boolean isQueryValid(String query) {
Log.d(TAG, "isQueryValid()");
return !query.equals("") && query.trim().length() > 2; return !query.equals("") && query.trim().length() > 2;
} }

View File

@@ -36,8 +36,8 @@
<ImageView <ImageView
android:id="@+id/search_suggestion_delete_icon" android:id="@+id/search_suggestion_delete_icon"
android:layout_width="wrap_content" android:layout_width="20dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:src="@drawable/ic_close" android:src="@drawable/ic_close"
app:layout_constraintBottom_toBottomOf="@id/search_suggestion_icon" app:layout_constraintBottom_toBottomOf="@id/search_suggestion_icon"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB