Commit graph

25 commits

Author SHA1 Message Date
Ashish Kumar
1b01c6517f Show campaigns (#2113)
* Show campaigns
* Added a ui util class SwipableCardView which passes the onSwipe event to its children
* NearbyCardView & CampaignView extend SwipableCardView
* Fetch campaigns in ContributionsFragment
* Added an option to enable disable campaign in Settings/Preferences

* synced strings with master

* removed duplicate initialsation of CampaignPresenter
2018-12-15 02:55:53 +10:00
neslihanturan
d62a7586e0 Fixes #2001 New main UI - progress bar in Nearby card view sometimes runs forever. (#2021)
* Localisation updates from https://translatewiki.net.

* Remove unused mediawiki api dependency (#1991)

* Categories with pipe suffix (#1873)

* Bug fix issue #1826
Changes made :
-Certain category names used to show suffixed with strings prefixed with pipe '|'. Removed everything after the pipe. As per the discussion on the thread, its safe to remove everything after the pipe, including the pipe

* review suggested changes
*Code formatting
*Extracted out the index of pipe in a variable
*Added issue link in comments

* Remove libraries section from README (#1988)

* Remove libraries section from README

* Add wiki link to "libraries used" to README

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Display nearby notification only if it is loaded

* Cover don't ask again checkbox is selected posibility

* Clean commented out codes

* Add strings to string.xml

* Add unable to display text to strings xml

* Fix nearby card permission explanation string

* Add never ask again checkbox to dialogbox

* Add action to never display checkbox

* Implement a setting on settings page, to be able to enable this setting later

* Revert unnecessary changes
2018-11-26 03:47:41 +10:00
neslihanturan
02908a678b Main screen ui changes, fixes #725 Main screen UI overhaul (#1922)
* Delete Contributions Activity content to rewrite it

* Add layout for new Contributions Activity design

* Bind views

* Override auth cookie required

* Add tabs and fragments method

* Create ContributionsFragment which will hold ContributionsListFragment and MediaDetailsFragment

* Add NearbyFragment which will hold NearbyMapFragment and NearbyListFragment

* Add ContributionsActivityPagerAdapter inner class to manage view pager

* Create strings will be written on tabs for contributions and nearby

* Create setTabAndViewPagerSynchronisation method to sycn view pager and tab layout. If user swipe pages, tabs will also change (and vice versa)

* Add theme dependent background color for Drawer Layout of activity_contributions layout file

* Add theme dependent background color for tabs in main

* Create Contributions Fragment structure which will hold Media Detail Fragment and Contributions List Fragment

* Inifilate contributions list fragment view

* Create variables and methods to reuse and create Media Detils Fragment and Contributions List Fragment which will be inside Contribution Fragment

* Override cursor loader methods

* set MediaDetilsView fragment or ContributionListFragment according to users state

* Show details of an image when item is clicked

* Add delete and retry functionality, note: not tested yet

* Override media count methods

* Implement onBack Pressed settings

* Register and unregister datasetObservers

* Add contributin list fragment

* Add contribution list layout with FABs for camera and galerry

* Make sure we called onAuthAcquired from fragment after is is attached

* Create ContributionListViewUtils class to change visibility of views according to MediaDetailsFragment visiblity or their loading state

* Make number of uploads visible if contribution list is visible and number of uploads is uploaded. Progress bar is visible if contribution list is visible and number of uploads are uploading. Both invisible if Media Details Fragment is visible

* Return parent fragment instead of parent activity

* GetPagerFragment instead of getActivity since currently ContributionsFragment take over responsibility from ContributionsActivity

* Add contribution number next to tab text for contribution, as discussed in thread

* Remove number of uploads from contributions fragment since we moved it text of tab layout

* Add unread notifications asynctask to check unread notifications on background

* Save latest time user notification activity viewed

* Add shared preferences provider for latest notification activity visit time

* Add shared preferences provider for latest notification activity visit time

* Change notification icon (add blue dot) whenever a notification comes

* Recover notifications state on come back to contributions list from media details fragment

* Add date with year parameter to Notification class, because we will use it on comparasion of dates

* Check if user visited noifications activity after last notification came

* Add ation to notification icon

* Add nearby custom card view class

* Add card view to activity

* Add a button which will be displayed when nearby permission is not granted thus closest point can't be displayed on main screen. Besides, theme dependent click styles are added to button

* Add button click and permission request logic. Not: solve why location manager is null

* Inject location manager to activity instead

* Make card view dismissable with swip

* Add preference to disable or display closest nearby location

* Add a bugfix to set visibility of nearby notification cardview

* Add UI modifier methods to display notifications

* Modify getFromWikidataQuery method, so that based on the restunClosestResult boolean, we get only the closest nearby place, instead of fetching bunch of nearby places each time

* Make inner class vaariables public to reach them out of package

* Temporarily comment out icon setter methods since it crashes under API19

* Inject location manager

* Register location manager accoring to permission is given, then call nearby card view updater methods

* Change method calls loadAttractionsFromLocation by considering new parameter to decide between closest nearby call or an usual nearby call

* Add progress bar to nearby cardview

* Fix notifications string

* Hide nearby card view when Media Details is visible

* Change tab on nerby card view click

* Add hardcoded strings to strings.xml

* Move nearby activity to new nearby frament

* Add fragments for nearby list and map into outer nearby fragment

* Change options menu item according to tab view

* Make nearby card view invisible on swipe to nearby tab

* Use retained nearby fragment

* Add action to list sheet button

* This commit caused contrib list become invisible thus,
Revert "Use retained nearby fragment"

This reverts commit 86b3633b23.

* Make sure retained fragments are used for -both- nearby and contrib fragments

* Remove unrelated part added because of confusion, sorry

* Make sure nearbyNotificationCardView visibility works corrent

* Move nearby methods from nerby activity to nearby fragment, and add a lastLocationDuplicate variable to distinguish first time location from nearby fragment and nearby notification card on contributions activity

* Change activity.findViewByID lines with parentFragment.view.findViewById

* Remove toolbar from nearby fragment, since contributions activity already has

* Disable view pager swipe, since using map is very hard with swipe option of view pager

* Place progress bar inside nearby card notification to center

* Make sure using retaied nearby map fragment and nearby list fragment inside nearby fragment

* Update nearby notification content on slight location updates too, if it is first update after on resume. This prevented very long time loading progress bar

* Add case for no nearest pleace found, to prevent bug

* Prevent a possible bug can be caused from activity already killed

* Add click actions to FAB buttons in contributions list fragment. And arrange FAB margins

* Try to use a new location manager instance instead of using single object for both nearby map and nearby notification card view. Because location manager has a state mechanism which is designed to be called from a single point. When I call same methods from both nearby card view notification and nearby map, next update time of map etc. gets confused.

* Set radius to initial value on getFromWikidataQuery (when it is called for getting closest result to be used in nearby card view notification). Normally, algorithm increase radius, this technique works for nearby map but when it comes to finding nearest point, it can return null

* Add an enum to make card view visibility more stable, however, still there is a bug.

* Prevent some more nearby card view visilbility bugs, however still there is a bug

* Add some nullchecks for precaution

* Check nearby permission and refresh nearby view if nearby tab selected, othervise do nothing

* Send user to contrib tab if permission is denied after masrhmallow

* Change nearby fragment background so that progress bar is visible now

* Reduce code duplicate

* request location and gps permission from contribution nearby car view too

* Make sure using retained fragments

* Make sure Contrib list fragment is retained on orientation change

* Fix NPE at options menu

* Make fragment flag fancier, define it per fragment instance, instead of activity

* Fix Service leak and onsavedInstance NPE errrors both occured on orientation change

* Refresh nearby map on orientation change

* Remove unused imports, organise logs and add comments for NearbyMapFragment class

* Remove all references of nearby activity, since we don't use it anymore

* Remove unused imports, organise logs and add comments for Nearby Controller

* Remove unused imports, organise logs and add comments for NearbyFragment

* Remove unused imports, organise logs and add comments for NearbyNotificationCardView

* Change class name from Contributions Activity to Main Activity. Remove unused imports, organise logs and add comments for MainAtivity

* Remove extra spaces

* Remove unused imports and logs

* Remove unused imports, organise logs and add comments for LocationServiceManager

* Remove unused imports, organise logs and add comments for NotificationsActivity

* Remove unused imports, organise logs and add comments for Contributions Fragment

* bug fix nearby notification card dismiss/restore issue

* Change display_nearby_notification_summary varibale with Tap here to see the nearest place that needs pictures

* Add nearest place notification card dismiss toast

* Fix mistake made on previous commit, while fixing conflicts

* Set no data yet message invisible after contributions list is loaded

* Change FAB margins, according to Josephine's review

* Change FAB margins, according to Josephine's review

* Change contributions list background to white, to make FAB more visible

* Add infobutton with popup window next to nearby tba, to explain what does this tab do

* Change hambuger icon to back arrow when media details activity visible

* On back button clicked from nearby fragment, switch back to contributions fragment, instead of closing the app

* Check nearby card view visibility on coming back from media details activity

* Change notification icon with default vector supplied by android vector repos. If we use the one I drawn on inkscape, produced vector is not compatible with API level 19 and below. I couldn't find a proper solution, and decided to change icon

* Fix a possible NPE, caused by loation manager has Main activity reference after it is destroyed

* Change hardcoded string with var from string xml

* Make sure you listen storage permissions from contribution list framgent FABs

* Make sure you listened storage permissions for Neaby fragment buttons too

* Check NPEs causing crashes. Now it does not crash after coming back from settings activity

* Make notification icon compatible with <API19 devices, by drawing and using .png images

* Change back icon arrow vector with png

* Attempt to solve location manager caused memory leak

* Fix memory leaks and optimize imports

* Merge 2.9 release
2018-11-11 03:26:01 +11:00
seannemann21
1bf5dda4b2 Allow for settings titles to expand across multiple lines instead of being truncated (#1671)
* Added preference classes that allow for titles with multiple lines for settings with long titles

* Added null checks to ensure the title TextView isn't null
2018-07-23 08:50:46 +03:00
misaochan
97d63cef6b Added comment in place of allowGps key 2018-06-21 17:50:44 +10:00
misaochan
b5c74c350b Remove "automatically get current location" Setting entirely 2018-06-19 21:25:19 +10:00
Ujjwal Agrawal
b017d1c99a Changed webview to Custom Tabs in Settings Page (#1328)
* Changed Webview to Custoom tabs in Settings Page

* Get COntext changed to getActivity
2018-04-30 12:24:37 +03:00
Vivek Maskara
50d9cff8c6
Merge branch 'master' into directNearbyUploadsNew 2018-03-21 17:54:03 +05:30
Madhur Gupta
bdd7a86cd5 Revamp the Settings page (#1259)
* Revamp the Settings page

* Update License Test
2018-03-11 00:56:05 +05:30
maskara
7408d89abd Remove CSV option for nearby places 2018-03-02 23:08:20 +05:30
Vishan Seru
1d0a701dd3 Changed usage of 'logs' to 'log file' to better fit the grammar 2017-10-21 20:48:52 +05:30
Vishan Seru
836a1e3664 Added option in SettingsFragment to allow users to send the logs as a file via email 2017-10-21 13:44:06 +05:30
Paul Hawke
7dd3dced35 Fixed merge conflicts 2017-09-26 22:33:59 -05:00
mebr1416
1c63681e64 Resolve for "Day mode by default #825" 2017-08-03 15:01:22 +03:00
Yusuke Matsubara
08e6743869 Merge branch 'master' into tidySettings 2017-05-14 20:57:01 +09:00
Dinu Kumarasiri
6feed8cab1 Add a new preference to set the upload limit 2017-05-13 17:24:02 +02:00
Adam Jones
87fe6cf585 Create untranslatable strings for pref constants 2017-05-10 22:51:19 +01:00
Yusuke Matsubara
8731987385 Generate Nearby list using Wikidata Query
Plus,
* remove duplicate location service manager
* add option to switch data sources of Nearby
* faster sorting of places
* minor coding style improvents
2017-04-14 17:38:45 +09:00
Adam Jones
2ab5fa7ff6 Remove duplicate classes, move back theme preference
Also fix prefs to match arrays to remove spinner bug in SingleUploadFragment
2017-04-02 16:40:05 +01:00
Adam Jones
0fe7a05731 Create SettingsFragment 2017-04-02 16:37:46 +01:00
Neslihan
5ecc48fe70 Fix new theme issue (number 3) 2017-03-20 16:46:20 +03:00
Neslihan
7e256175dc Move theme checkbox to settings activity 2017-03-18 01:49:19 +03:00
maskara
3561997728 Updated title and description for beta link 2017-03-12 20:03:03 +05:30
maskara
18f1ccb563 Add beta opt in link in settings page 2017-03-12 19:51:51 +05:30
Yusuke Matsubara
b4231bbfdc Merge "commons" into the project root directory 2016-07-02 16:48:57 +09:00
Renamed from commons/app/src/main/res/xml/preferences.xml (Browse further)