mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 05:43:55 +01:00
* Add layout items for nearby filter list and filter item (cherry picked from commitb96f8a68ce) * Edit nearby query (cherry picked from commit1f3c8c8deb) * Add filter items to nearby parent fragment xml (cherry picked from commitd0beadd0e0) * Add icon for green marker (cherry picked from commitf65ca0387a) * Add layout util file to organize layout utilities (cherry picked from commit5c57939245) * Add pic parameter to nearby result item (cherry picked from commit86007e4bb6) * Add pic parameter to place type (cherry picked from commit25c358b67f) * Add green marker styling (cherry picked from commit929c92d887) * Inıt search layouts on Nearby parent (cherry picked from commit2ac38a1919) * Style green markers at nearby controller (cherry picked from commit3e08f39f8e) * Edit bookmark daos to include pic to tables (cherry picked from commit48d69edf3b) * TODO foc bookmark dao item but works now (cherry picked from commitf748399720) * Style nearby filter area (cherry picked from commit6267e488b0) * fix style of filter tab (cherry picked from commit5f843bf366) * Add nearby list adapter (cherry picked from commit56334afe03) * Current status, list size is working, visibility working, filter mechanism is ready (cherry picked from commit7d75c9c589) * Filtering works (cherry picked from commit8a13cf7728) * Filter function works (cherry picked from commit78368a2c0c) * Fix style issues (cherry picked from commit2204f70255) * Add divider to recyclerview (cherry picked from commitc8100b55d7) * Hide bottom sheets accordingly (cherry picked from commitc5deba8b0b) * Code cleanup (cherry picked from commitcf8f64f3cb) * Add actions to chips * Fetch destroyed information from servers * Add destroyed places icon * Make chip filter functions work * Revert irrelevant changes * Revert accidentally replaced strings * Remove unneeded lines * Remove only places expalanation from trings * Do not filter if nearby places are not loaded * Add triple checkbox for add none and neutral * Make tri checkbox work * Fix travis issue * Add coments * fix search this area button locaton * Set initial place type state and recover it between each populate places
This commit is contained in:
parent
5c6ab3b253
commit
b3c11842f3
35 changed files with 1264 additions and 66 deletions
|
|
@ -6,6 +6,7 @@ import android.database.Cursor;
|
|||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.RemoteException;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -156,8 +157,11 @@ public class BookmarkLocationsDao {
|
|||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_DESCRIPTION)),
|
||||
location,
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_CATEGORY)),
|
||||
builder.build()
|
||||
builder.build(),
|
||||
null,
|
||||
null
|
||||
);
|
||||
// TODO: add pic and destroyed to bookmark location dao
|
||||
}
|
||||
|
||||
private ContentValues toContentValues(Place bookmarkLocation) {
|
||||
|
|
@ -172,6 +176,7 @@ public class BookmarkLocationsDao {
|
|||
cv.put(BookmarkLocationsDao.Table.COLUMN_COMMONS_LINK, bookmarkLocation.siteLinks.getCommonsLink().toString());
|
||||
cv.put(BookmarkLocationsDao.Table.COLUMN_LAT, bookmarkLocation.location.getLatitude());
|
||||
cv.put(BookmarkLocationsDao.Table.COLUMN_LONG, bookmarkLocation.location.getLongitude());
|
||||
cv.put(BookmarkLocationsDao.Table.COLUMN_PIC, bookmarkLocation.pic);
|
||||
return cv;
|
||||
}
|
||||
|
||||
|
|
@ -189,6 +194,7 @@ public class BookmarkLocationsDao {
|
|||
static final String COLUMN_WIKIPEDIA_LINK = "location_wikipedia_link";
|
||||
static final String COLUMN_WIKIDATA_LINK = "location_wikidata_link";
|
||||
static final String COLUMN_COMMONS_LINK = "location_commons_link";
|
||||
static final String COLUMN_PIC = "location_pic";
|
||||
|
||||
// NOTE! KEEP IN SAME ORDER AS THEY ARE DEFINED UP THERE. HELPS HARD CODE COLUMN INDICES.
|
||||
public static final String[] ALL_FIELDS = {
|
||||
|
|
@ -202,7 +208,8 @@ public class BookmarkLocationsDao {
|
|||
COLUMN_IMAGE_URL,
|
||||
COLUMN_WIKIPEDIA_LINK,
|
||||
COLUMN_WIKIDATA_LINK,
|
||||
COLUMN_COMMONS_LINK
|
||||
COLUMN_COMMONS_LINK,
|
||||
COLUMN_PIC
|
||||
};
|
||||
|
||||
static final String DROP_TABLE_STATEMENT = "DROP TABLE IF EXISTS " + TABLE_NAME;
|
||||
|
|
@ -218,7 +225,8 @@ public class BookmarkLocationsDao {
|
|||
+ COLUMN_IMAGE_URL + " STRING,"
|
||||
+ COLUMN_WIKIPEDIA_LINK + " STRING,"
|
||||
+ COLUMN_WIKIDATA_LINK + " STRING,"
|
||||
+ COLUMN_COMMONS_LINK + " STRING"
|
||||
+ COLUMN_COMMONS_LINK + " STRING,"
|
||||
+ COLUMN_PIC + " STRING"
|
||||
+ ");";
|
||||
|
||||
public static void onCreate(SQLiteDatabase db) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue