From e74a273f97f27ac42ad6e13be3e21446981fbc85 Mon Sep 17 00:00:00 2001 From: stom79 Date: Thu, 23 Nov 2017 18:16:47 +0100 Subject: [PATCH] Search with keywords --- .../mastodon/activities/BaseMainActivity.java | 17 ++- ...apter.java => SearchTootsListAdapter.java} | 28 ++-- .../mastodon/drawers/TagsSearchAdapter.java | 5 +- .../fragments/DisplaySearchFragment.java | 137 +++++++++++++++++ .../etalab/mastodon/sqlite/SearchDAO.java | 139 ++++++++++++++++++ .../gouv/etalab/mastodon/sqlite/Sqlite.java | 13 +- .../ic_keyboard_arrow_right.xml | 9 ++ .../res/drawable-hdpi/ic_action_add_new.png | Bin 0 -> 134 bytes .../res/drawable-ldpi/ic_action_add_new.png | Bin 0 -> 119 bytes .../res/drawable-mdpi/ic_action_add_new.png | Bin 0 -> 116 bytes .../res/drawable-xhdpi/ic_action_add_new.png | Bin 0 -> 168 bytes .../res/drawable-xxhdpi/ic_action_add_new.png | Bin 0 -> 242 bytes .../drawable-xxxhdpi/ic_action_add_new.png | Bin 0 -> 500 bytes app/src/main/res/layout/activity_main.xml | 9 ++ app/src/main/res/layout/drawer_search.xml | 39 +++++ app/src/main/res/layout/fragment_search.xml | 65 ++++++++ app/src/main/res/layout/search_toot.xml | 13 ++ .../main/res/menu/activity_main_drawer.xml | 4 + app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 2 + app/src/main/res/values-nl/strings.xml | 1 + app/src/main/res/values-pt/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 23 files changed, 466 insertions(+), 18 deletions(-) rename app/src/main/java/fr/gouv/etalab/mastodon/drawers/{TagsListAdapter.java => SearchTootsListAdapter.java} (74%) create mode 100644 app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplaySearchFragment.java create mode 100644 app/src/main/java/fr/gouv/etalab/mastodon/sqlite/SearchDAO.java create mode 100644 app/src/main/res/drawable-anydpi/ic_keyboard_arrow_right.xml create mode 100644 app/src/main/res/drawable-hdpi/ic_action_add_new.png create mode 100644 app/src/main/res/drawable-ldpi/ic_action_add_new.png create mode 100644 app/src/main/res/drawable-mdpi/ic_action_add_new.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_action_add_new.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_add_new.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_action_add_new.png create mode 100644 app/src/main/res/layout/drawer_search.xml create mode 100644 app/src/main/res/layout/fragment_search.xml create mode 100644 app/src/main/res/layout/search_toot.xml diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/BaseMainActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/BaseMainActivity.java index daaf8d3a7..c79078fa8 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/BaseMainActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/BaseMainActivity.java @@ -90,6 +90,7 @@ import fr.gouv.etalab.mastodon.fragments.DisplayDraftsFragment; import fr.gouv.etalab.mastodon.fragments.DisplayFollowRequestSentFragment; import fr.gouv.etalab.mastodon.fragments.DisplayNotificationsFragment; import fr.gouv.etalab.mastodon.fragments.DisplayScheduledTootsFragment; +import fr.gouv.etalab.mastodon.fragments.DisplaySearchFragment; import fr.gouv.etalab.mastodon.helper.Helper; import fr.gouv.etalab.mastodon.interfaces.OnRetrieveInstanceInterface; import fr.gouv.etalab.mastodon.interfaces.OnRetrieveMetaDataInterface; @@ -120,7 +121,7 @@ import android.support.v4.app.FragmentStatePagerAdapter; public abstract class BaseMainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, OnUpdateAccountInfoInterface, OnRetrieveMetaDataInterface, OnRetrieveInstanceInterface { - private FloatingActionButton toot, delete_all; + private FloatingActionButton toot, delete_all, add_new; private HashMap tagTile = new HashMap<>(); private HashMap tagItem = new HashMap<>(); private TextView toolbarTitle; @@ -568,6 +569,7 @@ public abstract class BaseMainActivity extends AppCompatActivity toot = findViewById(R.id.toot); delete_all = findViewById(R.id.delete_all); + add_new = findViewById(R.id.add_new); toot.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -1086,6 +1088,7 @@ public abstract class BaseMainActivity extends AppCompatActivity tabLayout.setVisibility(View.VISIBLE); toolbarTitle.setVisibility(View.GONE); delete_all.setVisibility(View.GONE); + add_new.setVisibility(View.GONE); final NavigationView navigationView = findViewById(R.id.nav_view); unCheckAllMenuItems(navigationView); toot.setVisibility(View.VISIBLE); @@ -1258,6 +1261,11 @@ public abstract class BaseMainActivity extends AppCompatActivity }else{ delete_all.setVisibility(View.VISIBLE); } + if( id != R.id.nav_search){ + add_new.setVisibility(View.GONE); + }else{ + add_new.setVisibility(View.VISIBLE); + } if (id == R.id.nav_settings) { toot.setVisibility(View.GONE); TabLayoutSettingsFragment tabLayoutSettingsFragment= new TabLayoutSettingsFragment(); @@ -1296,12 +1304,17 @@ public abstract class BaseMainActivity extends AppCompatActivity fragmentManager.beginTransaction() .replace(R.id.main_app_container, displayScheduledTootsFragment, fragmentTag).commit(); }else if (id == R.id.nav_drafts) { - toot.setVisibility(View.VISIBLE); DisplayDraftsFragment displayDraftsFragment = new DisplayDraftsFragment(); fragmentTag = "DRAFTS"; fragmentManager.beginTransaction() .replace(R.id.main_app_container, displayDraftsFragment, fragmentTag).commit(); toot.setVisibility(View.GONE); + }else if (id == R.id.nav_search) { + DisplaySearchFragment displaySearchFragment = new DisplaySearchFragment(); + fragmentTag = "SEARCH"; + fragmentManager.beginTransaction() + .replace(R.id.main_app_container, displaySearchFragment, fragmentTag).commit(); + toot.setVisibility(View.GONE); }else if( id == R.id.nav_follow_request){ toot.setVisibility(View.GONE); DisplayFollowRequestSentFragment followRequestSentFragment = new DisplayFollowRequestSentFragment(); diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/TagsListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/SearchTootsListAdapter.java similarity index 74% rename from app/src/main/java/fr/gouv/etalab/mastodon/drawers/TagsListAdapter.java rename to app/src/main/java/fr/gouv/etalab/mastodon/drawers/SearchTootsListAdapter.java index 3990686c5..3d5ae9f35 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/TagsListAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/SearchTootsListAdapter.java @@ -27,27 +27,27 @@ import fr.gouv.etalab.mastodon.R; /** - * Created by Thomas on 26/05/2017. - * Adapter for tags when searching + * Created by Thomas on 22/11/2017. + * Adapter for search */ -public class TagsListAdapter extends BaseAdapter { +public class SearchTootsListAdapter extends BaseAdapter { - private List tags; + private List searches; private LayoutInflater layoutInflater; - public TagsListAdapter(Context context, List tags){ - this.tags = tags; + public SearchTootsListAdapter(Context context, List searches){ + this.searches = searches; layoutInflater = LayoutInflater.from(context); } @Override public int getCount() { - return tags.size(); + return searches.size(); } @Override public Object getItem(int position) { - return tags.get(position); + return searches.get(position); } @Override @@ -59,18 +59,18 @@ public class TagsListAdapter extends BaseAdapter { @Override public View getView(final int position, View convertView, ViewGroup parent) { - final String tag = tags.get(position); + final String tag = searches.get(position); final ViewHolder holder; if (convertView == null) { - convertView = layoutInflater.inflate(R.layout.drawer_tag, parent, false); + convertView = layoutInflater.inflate(R.layout.drawer_search, parent, false); holder = new ViewHolder(); - holder.tag_name = (TextView) convertView.findViewById(R.id.tag_name); + holder.search_title = convertView.findViewById(R.id.search_keyword); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } - holder.tag_name.setText(tag); - holder.tag_name.setOnClickListener(new View.OnClickListener() { + holder.search_title.setText(tag); + holder.search_title.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -81,7 +81,7 @@ public class TagsListAdapter extends BaseAdapter { private class ViewHolder { - TextView tag_name; + TextView search_title; } diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/TagsSearchAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/TagsSearchAdapter.java index 4bc81fec9..595c0107f 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/TagsSearchAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/TagsSearchAdapter.java @@ -16,6 +16,7 @@ package fr.gouv.etalab.mastodon.drawers; import android.content.Context; +import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -63,6 +64,7 @@ public class TagsSearchAdapter extends ArrayAdapter implements Filterabl } + @NonNull @Override public View getView(final int position, View convertView, ViewGroup parent) { @@ -71,7 +73,7 @@ public class TagsSearchAdapter extends ArrayAdapter implements Filterabl if (convertView == null) { convertView = layoutInflater.inflate(R.layout.drawer_tag_search, parent, false); holder = new ViewHolder(); - holder.tag_name = (TextView) convertView.findViewById(R.id.tag_name); + holder.tag_name = convertView.findViewById(R.id.tag_name); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); @@ -81,6 +83,7 @@ public class TagsSearchAdapter extends ArrayAdapter implements Filterabl return convertView; } + @NonNull @Override public Filter getFilter() { return searchFilter; diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplaySearchFragment.java b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplaySearchFragment.java new file mode 100644 index 000000000..8b5fec273 --- /dev/null +++ b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplaySearchFragment.java @@ -0,0 +1,137 @@ +package fr.gouv.etalab.mastodon.fragments; +/* Copyright 2017 Thomas Schneider + * + * This file is a part of Mastalab + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Mastalab; if not, + * see . */ + +import android.annotation.SuppressLint; +import android.content.Context; +import android.content.DialogInterface; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.design.widget.FloatingActionButton; +import android.support.v4.app.Fragment; +import android.support.v7.app.AlertDialog; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.EditText; +import android.widget.ListView; +import android.widget.RelativeLayout; +import java.util.List; + +import fr.gouv.etalab.mastodon.activities.MainActivity; +import fr.gouv.etalab.mastodon.drawers.SearchTootsListAdapter; +import fr.gouv.etalab.mastodon.sqlite.SearchDAO; +import fr.gouv.etalab.mastodon.sqlite.Sqlite; +import fr.gouv.etalab.mastodon.R; + + +/** + * Created by Thomas on 22/11/2017. + * Fragment to display search with keywords + */ +public class DisplaySearchFragment extends Fragment { + + + private Context context; + private SearchTootsListAdapter searchTootsListAdapter; + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, final ViewGroup container, Bundle savedInstanceState) { + + View rootView = inflater.inflate(R.layout.fragment_drafts, container, false); + context = getContext(); + + final ListView lv_search_toots = rootView.findViewById(R.id.lv_search_toots); + + RelativeLayout mainLoader = rootView.findViewById(R.id.loader); + RelativeLayout textviewNoAction = rootView.findViewById(R.id.no_action); + mainLoader.setVisibility(View.VISIBLE); + final SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open(); + List searches = new SearchDAO(context, db).getAllSearch(); + if( searches != null && searches.size() > 0) { + searchTootsListAdapter = new SearchTootsListAdapter(context, searches); + lv_search_toots.setAdapter(searchTootsListAdapter); + searchTootsListAdapter.notifyDataSetChanged(); + }else { + textviewNoAction.setVisibility(View.VISIBLE); + } + mainLoader.setVisibility(View.GONE); + FloatingActionButton add_new = null; + try { + add_new = ((MainActivity) context).findViewById(R.id.add_new); + }catch (Exception ignored){} + if( add_new != null) + add_new.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + AlertDialog.Builder builder = new AlertDialog.Builder(context); + builder.setTitle(R.string.search); + builder.setIcon(android.R.drawable.ic_menu_search) + .setPositiveButton(R.string.validate, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogConfirm, int which) { + + AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); + LayoutInflater inflater = getLayoutInflater(); + @SuppressLint("InflateParams") View dialogView = inflater.inflate(R.layout.search_toot, null); + dialogBuilder.setView(dialogView); + final EditText editText = dialogView.findViewById(R.id.search_toot); + dialogBuilder.setPositiveButton(R.string.validate, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int id) { + String keyword = editText.getText().toString().trim(); + //Already in db + List searches = new SearchDAO(context, db).getSearchByKeyword(keyword); + if( searches.size() > 0){ + return; + } + new SearchDAO(context, db).insertSearch(keyword); + searches.add(keyword); + searchTootsListAdapter.notifyDataSetChanged(); + } + }); + AlertDialog alertDialog = dialogBuilder.create(); + alertDialog.show(); + } + }) + .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogConfirm, int which) { + dialogConfirm.dismiss(); + } + }) + .show(); + } + }); + return rootView; + } + + + @Override + public void onCreate(Bundle saveInstance) + { + super.onCreate(saveInstance); + } + + + @Override + public void onAttach(Context context) { + super.onAttach(context); + this.context = context; + } + + +} diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/sqlite/SearchDAO.java b/app/src/main/java/fr/gouv/etalab/mastodon/sqlite/SearchDAO.java new file mode 100644 index 000000000..26c13e506 --- /dev/null +++ b/app/src/main/java/fr/gouv/etalab/mastodon/sqlite/SearchDAO.java @@ -0,0 +1,139 @@ +package fr.gouv.etalab.mastodon.sqlite; +/* Copyright 2017 Thomas Schneider + * + * This file is a part of Mastalab + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Mastalab; if not, + * see . */ + +import android.content.ContentValues; +import android.content.Context; +import android.content.SharedPreferences; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import fr.gouv.etalab.mastodon.helper.Helper; + + +/** + * Created by Thomas on 22/11/2017. + * Manage search in DB + */ +public class SearchDAO { + + private SQLiteDatabase db; + public Context context; + private String userId; + + public SearchDAO(Context context, SQLiteDatabase db) { + //Creation of the DB with tables + this.context = context; + this.db = db; + SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); + userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null); + + } + + + //------- INSERTIONS ------- + + /** + * Insert a keyword in database + * @param keyword String + */ + public void insertSearch(String keyword) { + ContentValues values = new ContentValues(); + values.put(Sqlite.COL_KEYWORDS, keyword); + values.put(Sqlite.COL_USER_ID, userId); + values.put(Sqlite.COL_DATE_CREATION, Helper.dateToString(context, new Date())); + //Inserts search + try{ + db.insert(Sqlite.TABLE_SEARCH, null, values); + }catch (Exception ignored) {} + } + + + //------- REMOVE ------- + + /*** + * Remove search by keyword + * @return int + */ + public int remove(String keyword){ + return db.delete(Sqlite.TABLE_SEARCH, Sqlite.COL_KEYWORDS + " = \"" + keyword + "\" AND " + Sqlite.COL_USER_ID + " = \"" + userId+ "\"", null); + } + + //------- GETTERS ------- + + /** + * Returns all search in db for a user + * @return search List + */ + public List getAllSearch(){ + try { + Cursor c = db.query(Sqlite.TABLE_SEARCH, null, Sqlite.COL_USER_ID + " = '" + userId+ "'", null, null, null, Sqlite.COL_KEYWORDS + " ASC", null); + return cursorToListSearch(c); + } catch (Exception e) { + return null; + } + } + + + + /** + * Returns search by its keyword in db + * @return keywords List + */ + public List getSearchStartingBy(String keyword){ + try { + Cursor c = db.query(Sqlite.TABLE_SEARCH, null, Sqlite.COL_KEYWORDS + " LIKE \"%" + keyword + "%\" AND " + Sqlite.COL_USER_ID + " = \"" + userId+ "\"", null, null, null, null, null); + return cursorToListSearch(c); + } catch (Exception e) { + return null; + } + } + + /** + * Returns search by its keyword in db + * @return keywords List + */ + public List getSearchByKeyword(String keyword){ + try { + Cursor c = db.query(Sqlite.TABLE_SEARCH, null, Sqlite.COL_KEYWORDS + " = \"" + keyword + "\" AND " + Sqlite.COL_USER_ID + " = \"" + userId+ "\"", null, null, null, null, null); + return cursorToListSearch(c); + } catch (Exception e) { + return null; + } + } + + + /*** + * Method to hydrate stored search from database + * @param c Cursor + * @return List + */ + private List cursorToListSearch(Cursor c){ + //No element found + if (c.getCount() == 0) + return null; + List searches = new ArrayList<>(); + while (c.moveToNext() ) { + searches.add(c.getString(c.getColumnIndex(Sqlite.COL_KEYWORDS))); + } + //Close the cursor + c.close(); + //Search list is returned + return searches; + } +} diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/sqlite/Sqlite.java b/app/src/main/java/fr/gouv/etalab/mastodon/sqlite/Sqlite.java index c00fd1ab2..3abd799e5 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/sqlite/Sqlite.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/sqlite/Sqlite.java @@ -26,7 +26,7 @@ import android.database.sqlite.SQLiteOpenHelper; @SuppressWarnings("WeakerAccess") public class Sqlite extends SQLiteOpenHelper { - public static final int DB_VERSION = 6; + public static final int DB_VERSION = 7; public static final String DB_NAME = "mastodon_etalab_db"; public static SQLiteDatabase db; private static Sqlite sInstance; @@ -40,6 +40,8 @@ public class Sqlite extends SQLiteOpenHelper { static final String TABLE_STATUSES_STORED = "STATUSES_STORED"; //Table for custom emoji static final String TABLE_CUSTOM_EMOJI = "CUSTOM_EMOJI"; + //Table for search + static final String TABLE_SEARCH = "SEARCH"; public static final String COL_USER_ID = "USER_ID"; public static final String COL_USERNAME = "USERNAME"; @@ -95,6 +97,12 @@ public class Sqlite extends SQLiteOpenHelper { + COL_SHORTCODE + " TEXT NOT NULL, " + COL_INSTANCE + " TEXT NOT NULL, " + COL_URL + " TEXT NOT NULL, " + COL_URL_STATIC + " TEXT NOT NULL, " + COL_DATE_CREATION + " TEXT NOT NULL)"; + + public static final String COL_KEYWORDS = "KEYWORDS"; + private final String CREATE_TABLE_SEARCH = "CREATE TABLE " + TABLE_SEARCH + " (" + + COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + + COL_KEYWORDS + " TEXT NOT NULL, " + COL_USER_ID + " TEXT NOT NULL, " + COL_DATE_CREATION + " TEXT NOT NULL)"; + public Sqlite(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) { super(context, name, factory, version); } @@ -113,6 +121,7 @@ public class Sqlite extends SQLiteOpenHelper { db.execSQL(CREATE_TABLE_USER_ACCOUNT); db.execSQL(CREATE_TABLE_STATUSES_STORED); db.execSQL(CREATE_TABLE_CUSTOM_EMOJI); + db.execSQL(CREATE_TABLE_SEARCH); } @Override @@ -132,6 +141,8 @@ public class Sqlite extends SQLiteOpenHelper { + COL_URL + " TEXT NOT NULL, " + COL_URL_STATIC + " TEXT NOT NULL, " + COL_DATE_CREATION + " TEXT NOT NULL)"); case 5: db.execSQL("delete from "+ TABLE_CUSTOM_EMOJI); //Reset table due to bugs + case 6: + db.execSQL(CREATE_TABLE_SEARCH); default: break; } diff --git a/app/src/main/res/drawable-anydpi/ic_keyboard_arrow_right.xml b/app/src/main/res/drawable-anydpi/ic_keyboard_arrow_right.xml new file mode 100644 index 000000000..a3d162229 --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_keyboard_arrow_right.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-hdpi/ic_action_add_new.png b/app/src/main/res/drawable-hdpi/ic_action_add_new.png new file mode 100644 index 0000000000000000000000000000000000000000..7800ba33d627ceed4ab719da9cd8ce23ec437f50 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTCUr!gukcwMxZ*1gbFc4sJ_#S_2 zi=+a}Kg)xR>oyqX8t-HTDguHCt{uz}7K4H82V(|pMmHWP|G^zrFstG^^W;Nyen|ElzrUa8o?i*N5^xwE?&r!@^WUx-YfBWA` Sr8z*87(8A5T-G@yGywqEH70fd literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_action_add_new.png b/app/src/main/res/drawable-mdpi/ic_action_add_new.png new file mode 100644 index 0000000000000000000000000000000000000000..ed40b2b21627006beb1e6fa808e20b2304b557eb GIT binary patch literal 116 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzYfl%)kcwMxuWjUHP!M1~@MeF> znmG=xQ@EGZuJibqIeRuQ1H*wwjgkxu4fTw>Kj|F+>HX8fz;N7};aHVL;lI$d7eEmP MPgg&ebxsLQ09S`3zyJUM literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_action_add_new.png b/app/src/main/res/drawable-xhdpi/ic_action_add_new.png new file mode 100644 index 0000000000000000000000000000000000000000..185be8a769b4b5dccc8ca553f2f698fa5a801099 GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=`JOJ0Ar-gY-rC5?V8Fxd_;&x6 zOYK(zopr04XFQCIA2c literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_add_new.png b/app/src/main/res/drawable-xxhdpi/ic_action_add_new.png new file mode 100644 index 0000000000000000000000000000000000000000..2ab780a89de78daeb3faaf82d295a0007449cbe9 GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGoJ3U<-Ln>~)y>^h7!GMF=@LRmq z+y&>mxMW_69gx@ZT&eHQz~I2Zz`?-4$e_T$z{1eLz#zcDzyuQfb1j#FI8ecEPzqOh nF96QO&p@}7L530LjD$$`Hy8gfbhUB40GZ+G>gTe~DWM4f^m`)q literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_action_add_new.png b/app/src/main/res/drawable-xxxhdpi/ic_action_add_new.png new file mode 100644 index 0000000000000000000000000000000000000000..e6ca376b305d4bb78c96ec2aa1a40d4a1e0b30fb GIT binary patch literal 500 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrVBGEL;uunK>+K!KtV0eW4T-IC ziobUSd{mfstJ&ksqIb4U7cSV$n3`ZD((~z4t%0<4>w`Z>)r>YrF#?T%gPJYNGLzP* zx0!3bel-95^YypiZj(G#C$YO-aD8r4A4d_}hCbGJzyF!^yf)aC7<1~ysqE!5gp2nk zTQc96-ukcBXq}-uLnZT#sr$c0ym9{+C0@)j!MfqJ2ZJ~xhXVtXKm&sS1Cs*-2Lq!5 z0}D=$ok2scD?>Eno;<;i_Uy==^4RoSYhQ}~{v2<)E%jsn z;UAKm3Uy^YJD-+6+jH#Bb77x1=jSJHNo{=pxA?o!^0_~6eVXqdu+zT2&+zHo>(jp1 zG + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_search.xml b/app/src/main/res/layout/fragment_search.xml new file mode 100644 index 000000000..79e866911 --- /dev/null +++ b/app/src/main/res/layout/fragment_search.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/search_toot.xml b/app/src/main/res/layout/search_toot.xml new file mode 100644 index 000000000..8e3d07c86 --- /dev/null +++ b/app/src/main/res/layout/search_toot.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml index a9a59e353..37321399a 100644 --- a/app/src/main/res/menu/activity_main_drawer.xml +++ b/app/src/main/res/menu/activity_main_drawer.xml @@ -19,6 +19,10 @@ android:id="@+id/nav_drafts" android:icon="@drawable/ic_save_white" android:title="@string/drafts" /> + The app did not collect custom emojis for the moment. Live notifications Mit regulären Ausdrücken filtern + Suche diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 80ef552cf..645828d43 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -439,4 +439,6 @@ L\'application n\'a pas encore collecté d\'emojis personnalisés Notifications en direct Filtrer avec une expression rationnelle + + Rechercher diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index b770473bc..9d1f62dc1 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -436,4 +436,5 @@ The app did not collect custom emojis for the moment. Live notifications Wegfilteren met reguliere expressies + Zoeken diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index d18fd7617..c703743af 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -438,4 +438,5 @@ The app did not collect custom emojis for the moment. Live notifications Filtrar com uma expressão regular + Pesquisar diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c913eb5c4..739943faf 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -445,4 +445,5 @@ Filter out by regular expressions + Search \ No newline at end of file