Commit graph

44 commits

Author SHA1 Message Date
HectorRoblesWolf
790bb3c19e Issue #1981 fixed (#1998)
* notification: replaced ReadMoreTextView by TextView

* removed com.borjabravo:readmoretextview:2.1.0 package

* Update build.gradle

Re-add implementation 'com.borjabravo:readmoretextview:2.1.0' to prevent travis fail
2018-12-18 13:59:33 +02:00
Shridhar
0e3ca3e41f Fix #2107 by changing notification text colour to white in night mode 2018-12-13 20:26:22 +05:30
neslihanturan
8eac08fc04 Small ui fixes on new main ui (#1995)
* Return to main activity from notifications activity on back button is pressed

* Make nearby info image a little far from nearby text, to prevent wrong clicks
2018-11-19 17:00:32 +05:30
neslihanturan
e0bd00bb9b 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-19 17:00:32 +05:30
Paul Oranje
7b7d17a33b Fixes #171 Fix Lint errors/warnings: global, coding style: add missing spaces (#1955)
* Inserted missing spaces between `if` and `(` to improve code style, in line with GSG 4.6.2
2018-11-04 14:37:28 +00:00
Bruno
0cf2299e49 Added an onclick to the middle text of a Notification (#1872)
* Enhancement issue #1862

Added on click to the "middle text" of a Notification item.

* Added comment #1862

Added comment to better explain method usage.
2018-11-04 14:34:40 +00:00
Edward Savage
e8f4a286c5 Lambda usage simplifications (#1928)
* Replace anonymous type with lambda
* Use method reference
* Replace with expression lambda
2018-11-02 18:28:42 +00:00
konohakesh
154f1622b2 Fix crash on notifications #1959 (#1964) 2018-10-31 20:22:39 +11:00
Dmitry Brant
2884bd934a Remove dependency on Glide, Picasso, SVG, and multidex. (#1859)
* Eliminate the use of Picasso.

This gets rid of the single use of the Picasso library (which was causing
the whole library to be imported and shipped) and replaces it with Glide.
TODO: replace this and the other instance(s) of Glide usage with Fresco,
or vice versa.

* Remove dependency on Glide.

This removes the dependency on Glide, as well as the SVG rendering
library, whose only purpose was to display a single SVG image in the
Notification activity. Unfortunately Android doesn't support SVG natively,
but Echo notifications have icons that are SVG formatted. Rather than
import a bunch of heavy libraries to support this single case of SVG
rendering, we can simply create a few local drawables that correspond to
the different types of notifications, and use them instead.

* Remove multidex!

Multidex is a killer of performance and should be avoided at all costs.

* Remove further unused bits.

* Remove final vestige of multidex.
2018-08-30 14:40:17 +03:00
Vivek Maskara
0e86741cc4
Merge branch 'master' into wikidataEdits 2018-05-31 10:02:38 +05:30
Vivek Maskara
4815e93fc9 Make P18 edits to corresponding wikidata entity on uploading from Nearby (#1495)
* Localisation updates from https://translatewiki.net.

* Integrate API for displaying featured images (#1456)

* Integrate API for displaying featured images

* Add pagination and refactor code so that it can be reused for category images

* Add license info to the images

* Fix author view

* Remove unused values

* Fix minor issues with featured images

* Fix null license url issue

* Remove some log lines

* Fix back navigation issue

* fix tests

* fix test inits

* Gracefully handling various error situations

* Added java docs

* Update pull_request_template.md (#1476)

* Update pull_request_template.md

* Remove Javadocs mention

* Added required/optional notes

* resolves #1464 : MediaDataExtractor is making inefficient (redundant) server calls (#1496)

* Open map of place where picture was taken (#1360)

* Intent to map added

*  Merge conflicts resolved

*  Added the functionality to hide FAB incase of null coordinate

*  Merge Conflict resolved

*  Improve pr quality

* Improve Quality

*  Added nested FAB animations

* Nested FAB implemented

*  Improve Quality

*  Added up arrow

*  Javadocs Added

* Add nearby tutorial (#1467)

* Add dependency for MaterialShowcase

* Add actionview class to get a reference to material showcase

* Create a NearbyMaterialShowcaseSequence class

* Apply sequence steps

* Add first three steps of nearby showcase

* Add sequence id constants to make sure they will be displayed only once

* Add last step of sequence to explain plus fab

* Create an object to prevent customize all sequences every time

* Fix typo

* Code cleanup

* Add strings to strings.xml

* Code cleanup

* Revert irrelevant change

* Revert irrelevant change

* Remove showcaseview for recenter button

* Use single showcaseView instead of sequence

* Add single showcase view insted of sequence to be able to edit text style

* Make sure it will be displayed only once

* Cleanup

* Update strings

* Change dismiss text style

* CONTRIBUTING: fix formatting of the gist of the guidelines (#1453)

* CONTRIBUTING: fix formatting of the gist of the guidelines

First level headings for a gist seems to be overkill.

So, replace first level headings with an ordered-list which
sounds more meaningful.

* CONTRIBUTING: specify clearly that 'blame' is a feature of "Git"

The contributing file specifies about the ability to know who wrote
something without the need of @author javadoc tags but incorrectly
attributes the feature to GitHub.

Correctly attribute the feature to where it belongs, Git, and specify
the name of the feature to help users easily take advantage of it.

* Feature/switch to butterknife (#1494)

* Implemented butterknife in MediaDetailFragment [issue #1491]

* Implemented butterknife in MediaDetailPagerFragment [[issue #1491]]

* post merge upstream master wip [[issue #1491]]

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

* Bug fix #1504 (#1506)

* Bug fix #1504

* Filtered messages with ConnectException [issue #1504]

* A generalised message for exceptions in Nearby Activity [issue #1504]

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

* Fix security exception crash while accessing network location provider (#1498)

* Fix security exception crash while accessing network location provider

* Added java docs

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

* Log P18 edits to wikidata corresponding wikidata entity on uploading a nearby image

* Added java docs

* Fix test build

* Refresh nearby

* Refresh nearby list on successful edit

* Java docs

* Make authenticated wikidata edits

* Updated toast message to show entity name that was edited
2018-05-31 11:00:17 +10:00
Vivek Maskara
2a0b9d8a0b Enable crosswiki notifications and minor UI fixes in displaying notif… (#1540)
* Enable crosswiki notifications and minor UI fixes in displaying notifications

* Added java docs
2018-05-24 15:54:31 +03:00
Jatin0312
e23f7522f9 Fix for issue #1380 Improved Notification UI (#1387) 2018-03-31 17:11:30 +10:00
Ujjwal Agrawal
c6679edbda Improvements in Notification Activity (#1374)
* Improvements in Notification Activity

* Update NotificationActivity.java
2018-03-29 00:49:35 +05:30
maskara
365bbc470d Fix crash due to read more text view 2018-03-21 12:33:40 +05:30
maskara
528faa1c52 Null fix for notifications 2018-03-21 10:40:46 +05:30
maskara
f34af1ee4b With support for bundled notifications 2018-03-21 10:28:18 +05:30
maskara
59abd022e3 Minor notification fixes 2018-03-21 10:27:19 +05:30
maskara
21a6b1f00c Fixes in notifications for pending issues 2018-03-21 10:26:32 +05:30
Vivek Maskara
ff54d03aeb
Merge branch 'master' into Fixes-#1198 2018-03-16 18:40:41 +05:30
Vivek Maskara
51221f69c2
Merge pull request #1248 from Jatin0312/master
Fix for issue #1224 showing complete notification on click
2018-03-06 02:46:20 +05:30
Jatin Rao
ff11c9d1f0 Added a white space between text and show less 2018-03-04 22:19:40 +05:30
Jatin Rao
a446b5b662 Fixes #1250 Removed creation of multiple instances of Notification activity 2018-03-04 14:20:20 +05:30
Jatin Rao
6e9ea26023 Merge branch 'master' of https://github.com/commons-app/apps-android-commons 2018-03-03 19:55:23 +05:30
Jatin Rao
81147aada1 Fixes issue 1224 2018-03-03 19:55:09 +05:30
Jatin Rao
0a861317f4 Removed unsused variable from method getTrimmedText 2018-03-01 17:14:55 +05:30
Jatin Rao
534215fdbc Fix for issue #1224 showing complete notification on click 2018-03-01 15:57:13 +05:30
Hassan
e49f13ff74
Merge branch 'master' into master 2018-02-28 08:44:03 -06:00
Vivek Maskara
88a4e50bd3
Merge pull request #1193 from ayushin78/notificationItemDivider
Add ItemDivider in NotificationActivity
2018-02-27 01:27:39 +05:30
knightshade
01ad0c8c91 Notifications list retained across orientation change.
Fixes #1198
2018-02-26 00:34:35 +05:30
Ayushi
ccf68d12ff Remove View Bindings in NotificationActivity
* ButterKnife already used
2018-02-24 20:12:04 +05:30
Ayushi
324e2a60d6 Add ItemDivider in NotificationActivity (#1186)
* Use DividerItemDecoration to add ItemDivider in RecycleView
2018-02-24 20:11:20 +05:30
maskara
3045b63f99 Fix order of notifications 2018-02-24 02:22:48 +05:30
hismaeel
f9b99f9280 issue #1156 fix 2018-02-20 21:38:22 -05:00
Hassan
b03e67dcd6
Merge branch 'master' into master 2018-02-17 12:07:58 -06:00
hismaeel
5860825a09 Issue #1156 2018-02-17 11:02:35 -05:00
Manuel Lorenzo
304bf51f5f Fixing some lint issues for #171 2018-02-07 11:32:24 +01:00
maskara
41d6abdf40 Remove unused code 2018-01-22 04:09:43 +05:30
maskara
28a6a3b71d Integrate notifications API 2018-01-22 03:46:54 +05:30
maskara
d78c7befbd Revert "Revert "Merge pull request #1024 from neslihanturan/displayNotificationsUI""
This reverts commit d253db5444.
2018-01-21 14:54:25 +05:30
misaochan
d253db5444 Revert "Merge pull request #1024 from neslihanturan/displayNotificationsUI"
This reverts commit 031e53c988, reversing
changes made to 0aa20effe0.

revert UI notifications
2018-01-16 18:52:25 +10:00
neslihanturan
7abb530207 Add icons for notification list 2017-12-20 20:53:30 +03:00
neslihanturan
76ee338a20 Construct recyler list logic according to Renderers library of pedrovgs 2017-12-20 19:28:36 +03:00
neslihanturan
ddf978f8ca Add sample Notification and Notification controller classes 2017-12-20 19:27:04 +03:00