Skip to content

Main screen ui changes, fixes #725 Main screen UI overhaul #1922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 136 commits into from
Nov 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
48a6c7a
Delete Contributions Activity content to rewrite it
neslihanturan Sep 6, 2018
dccbe32
Add layout for new Contributions Activity design
neslihanturan Sep 6, 2018
14ce5da
Bind views
neslihanturan Sep 6, 2018
df1d552
Override auth cookie required
neslihanturan Sep 6, 2018
3f8d219
Add tabs and fragments method
neslihanturan Sep 6, 2018
19415d9
Create ContributionsFragment which will hold ContributionsListFragmen…
neslihanturan Sep 6, 2018
169fcb5
Add NearbyFragment which will hold NearbyMapFragment and NearbyListFr…
neslihanturan Sep 6, 2018
7540e03
Add ContributionsActivityPagerAdapter inner class to manage view pager
neslihanturan Sep 6, 2018
44b49d3
Create strings will be written on tabs for contributions and nearby
neslihanturan Sep 6, 2018
7b29ee5
Create setTabAndViewPagerSynchronisation method to sycn view pager an…
neslihanturan Sep 6, 2018
6a4d7fd
Add theme dependent background color for Drawer Layout of activity_co…
neslihanturan Sep 6, 2018
6c01530
Add theme dependent background color for tabs in main
neslihanturan Sep 7, 2018
7d8a44b
Create Contributions Fragment structure which will hold Media Detail …
neslihanturan Sep 7, 2018
d59a258
Inifilate contributions list fragment view
neslihanturan Sep 7, 2018
722f1ae
Create variables and methods to reuse and create Media Detils Fragmen…
neslihanturan Sep 7, 2018
f2ab66c
Override cursor loader methods
neslihanturan Sep 7, 2018
f44f08c
set MediaDetilsView fragment or ContributionListFragment according to…
neslihanturan Sep 7, 2018
9db815a
Show details of an image when item is clicked
neslihanturan Sep 7, 2018
d8ca1ec
Add delete and retry functionality, note: not tested yet
neslihanturan Sep 7, 2018
5252f6d
Override media count methods
neslihanturan Sep 7, 2018
01052a8
Implement onBack Pressed settings
neslihanturan Sep 7, 2018
738db83
Register and unregister datasetObservers
neslihanturan Sep 7, 2018
0950822
Add contributin list fragment
neslihanturan Sep 7, 2018
f5a1d98
Add contribution list layout with FABs for camera and galerry
neslihanturan Sep 7, 2018
270d341
Make sure we called onAuthAcquired from fragment after is is attached
neslihanturan Sep 7, 2018
f8d0671
Create ContributionListViewUtils class to change visibility of views …
neslihanturan Sep 7, 2018
9707b43
Make number of uploads visible if contribution list is visible and nu…
neslihanturan Sep 7, 2018
94201aa
Return parent fragment instead of parent activity
neslihanturan Sep 7, 2018
01461d2
GetPagerFragment instead of getActivity since currently Contributions…
neslihanturan Sep 9, 2018
0497737
Add contribution number next to tab text for contribution, as discuss…
neslihanturan Sep 9, 2018
137533f
Remove number of uploads from contributions fragment since we moved i…
neslihanturan Sep 9, 2018
714b22b
Add unread notifications asynctask to check unread notifications on b…
neslihanturan Sep 9, 2018
a2be516
Save latest time user notification activity viewed
neslihanturan Sep 9, 2018
6168aee
Add shared preferences provider for latest notification activity visi…
neslihanturan Sep 9, 2018
b5e5165
Add shared preferences provider for latest notification activity visi…
neslihanturan Sep 10, 2018
8aca9aa
Change notification icon (add blue dot) whenever a notification comes
neslihanturan Sep 10, 2018
0ef5265
Recover notifications state on come back to contributions list from m…
neslihanturan Sep 10, 2018
a759741
Add date with year parameter to Notification class, because we will u…
neslihanturan Sep 10, 2018
1906579
Check if user visited noifications activity after last notification came
neslihanturan Sep 10, 2018
5f91d7d
Add ation to notification icon
neslihanturan Sep 12, 2018
730dabd
Add nearby custom card view class
neslihanturan Sep 12, 2018
69df3c0
Add card view to activity
neslihanturan Sep 12, 2018
9fecc07
Add a button which will be displayed when nearby permission is not gr…
neslihanturan Sep 13, 2018
a37fbf0
Add button click and permission request logic. Not: solve why locatio…
neslihanturan Sep 13, 2018
0b965aa
Inject location manager to activity instead
neslihanturan Sep 14, 2018
3b5f8a3
Make card view dismissable with swip
neslihanturan Sep 14, 2018
b1ac46c
Add preference to disable or display closest nearby location
neslihanturan Sep 14, 2018
13ed4c0
Add a bugfix to set visibility of nearby notification cardview
neslihanturan Sep 16, 2018
8292561
Add UI modifier methods to display notifications
neslihanturan Sep 18, 2018
fc41235
Modify getFromWikidataQuery method, so that based on the restunCloses…
neslihanturan Sep 18, 2018
546e372
Make inner class vaariables public to reach them out of package
neslihanturan Sep 18, 2018
722cab9
Temporarily comment out icon setter methods since it crashes under API19
neslihanturan Sep 18, 2018
23e1aa7
Inject location manager
neslihanturan Sep 18, 2018
735b443
Register location manager accoring to permission is given, then call …
neslihanturan Sep 18, 2018
7de3ad8
Change method calls loadAttractionsFromLocation by considering new pa…
neslihanturan Sep 18, 2018
f4b0556
Add progress bar to nearby cardview
neslihanturan Sep 24, 2018
8861e40
Fix notifications string
neslihanturan Sep 24, 2018
cd52bee
Hide nearby card view when Media Details is visible
neslihanturan Sep 24, 2018
1d559f5
Change tab on nerby card view click
neslihanturan Sep 24, 2018
5395967
Add hardcoded strings to strings.xml
neslihanturan Sep 25, 2018
77840ae
Move nearby activity to new nearby frament
neslihanturan Sep 25, 2018
ed66711
Add fragments for nearby list and map into outer nearby fragment
neslihanturan Sep 28, 2018
ad10832
Change options menu item according to tab view
neslihanturan Sep 28, 2018
55a391a
Make nearby card view invisible on swipe to nearby tab
neslihanturan Sep 28, 2018
86b3633
Use retained nearby fragment
neslihanturan Sep 28, 2018
47868d2
Add action to list sheet button
neslihanturan Sep 28, 2018
8800fd4
This commit caused contrib list become invisible thus,
neslihanturan Oct 1, 2018
1c013b0
Make sure retained fragments are used for -both- nearby and contrib f…
neslihanturan Oct 1, 2018
06192ee
Remove unrelated part added because of confusion, sorry
neslihanturan Oct 1, 2018
2466c2d
Make sure nearbyNotificationCardView visibility works corrent
neslihanturan Oct 1, 2018
22cd1a5
Move nearby methods from nerby activity to nearby fragment, and add a…
neslihanturan Oct 2, 2018
7deb5bf
Change activity.findViewByID lines with parentFragment.view.findViewById
neslihanturan Oct 3, 2018
1b91bc6
Remove toolbar from nearby fragment, since contributions activity alr…
neslihanturan Oct 3, 2018
b3f52ce
Disable view pager swipe, since using map is very hard with swipe opt…
neslihanturan Oct 3, 2018
24d734e
Place progress bar inside nearby card notification to center
neslihanturan Oct 3, 2018
e738967
Make sure using retaied nearby map fragment and nearby list fragment …
neslihanturan Oct 3, 2018
8a85148
Update nearby notification content on slight location updates too, if…
neslihanturan Oct 4, 2018
e8e6ef4
Add case for no nearest pleace found, to prevent bug
neslihanturan Oct 4, 2018
af4f660
Prevent a possible bug can be caused from activity already killed
neslihanturan Oct 4, 2018
3ec6cbe
Add click actions to FAB buttons in contributions list fragment. And …
neslihanturan Oct 4, 2018
82533d4
Try to use a new location manager instance instead of using single ob…
neslihanturan Oct 5, 2018
a341cad
Set radius to initial value on getFromWikidataQuery (when it is calle…
neslihanturan Oct 5, 2018
abf1908
Add an enum to make card view visibility more stable, however, still …
neslihanturan Oct 5, 2018
506b93d
Prevent some more nearby card view visilbility bugs, however still th…
neslihanturan Oct 6, 2018
46f39af
Add some nullchecks for precaution
neslihanturan Oct 6, 2018
4fd4880
Check nearby permission and refresh nearby view if nearby tab selecte…
neslihanturan Oct 6, 2018
c1faf08
Send user to contrib tab if permission is denied after masrhmallow
neslihanturan Oct 6, 2018
ea791a2
Change nearby fragment background so that progress bar is visible now
neslihanturan Oct 6, 2018
607dd9b
Reduce code duplicate
neslihanturan Oct 6, 2018
6c8843f
request location and gps permission from contribution nearby car view…
neslihanturan Oct 6, 2018
c590f62
Make sure using retained fragments
neslihanturan Oct 7, 2018
5d54a3f
Make sure Contrib list fragment is retained on orientation change
neslihanturan Oct 7, 2018
3986f52
Fix NPE at options menu
neslihanturan Oct 8, 2018
9930a3d
Make fragment flag fancier, define it per fragment instance, instead …
neslihanturan Oct 8, 2018
56d3252
Fix Service leak and onsavedInstance NPE errrors both occured on orie…
neslihanturan Oct 9, 2018
cb2e3f4
Refresh nearby map on orientation change
neslihanturan Oct 9, 2018
4228b0e
Remove unused imports, organise logs and add comments for NearbyMapFr…
neslihanturan Oct 10, 2018
bd9f066
Remove all references of nearby activity, since we don't use it anymore
neslihanturan Oct 10, 2018
c5922d8
Remove unused imports, organise logs and add comments for Nearby Cont…
neslihanturan Oct 10, 2018
c646aa2
Remove unused imports, organise logs and add comments for NearbyFragment
neslihanturan Oct 10, 2018
d71a5a8
Remove unused imports, organise logs and add comments for NearbyNotif…
neslihanturan Oct 10, 2018
a2f96c0
Change class name from Contributions Activity to Main Activity. Remov…
neslihanturan Oct 10, 2018
5087918
Remove extra spaces
neslihanturan Oct 10, 2018
d4fe845
Remove unused imports and logs
neslihanturan Oct 10, 2018
d0f34d9
Remove unused imports, organise logs and add comments for LocationSer…
neslihanturan Oct 10, 2018
d1dd19c
Remove unused imports, organise logs and add comments for Notificatio…
neslihanturan Oct 10, 2018
9517152
Remove unused imports, organise logs and add comments for Contributio…
neslihanturan Oct 10, 2018
b7daf73
Fix conflicts
neslihanturan Oct 10, 2018
094cd65
bug fix nearby notification card dismiss/restore issue
ashishkumar468 Oct 17, 2018
1fe8c0a
Change display_nearby_notification_summary varibale with Tap here to …
neslihanturan Nov 1, 2018
825cc72
Add nearest place notification card dismiss toast
neslihanturan Nov 1, 2018
d0f689a
Fix conflicts
neslihanturan Nov 1, 2018
318b4fb
Fix mistake made on previous commit, while fixing conflicts
neslihanturan Nov 2, 2018
e13804f
Set no data yet message invisible after contributions list is loaded
neslihanturan Nov 2, 2018
0664277
Change FAB margins, according to Josephine's review
neslihanturan Nov 3, 2018
c4aac5a
Change FAB margins, according to Josephine's review
neslihanturan Nov 3, 2018
2ef801c
Change contributions list background to white, to make FAB more visible
neslihanturan Nov 3, 2018
a6ed31c
Add infobutton with popup window next to nearby tba, to explain what …
neslihanturan Nov 3, 2018
b5c71f7
Change hambuger icon to back arrow when media details activity visible
neslihanturan Nov 3, 2018
d181d65
On back button clicked from nearby fragment, switch back to contribut…
neslihanturan Nov 3, 2018
b7199bc
Check nearby card view visibility on coming back from media details a…
neslihanturan Nov 3, 2018
1d830a1
Change notification icon with default vector supplied by android vect…
neslihanturan Nov 3, 2018
b133f46
Fix conflicts
neslihanturan Nov 3, 2018
463bb78
Merge branch 'mainUIChanges' into neslihanturan-mainUIChanges
ashishkumar468 Nov 3, 2018
282aa69
Merge pull request #5 from ashishkumar468/neslihanturan-mainUIChanges
neslihanturan Nov 3, 2018
710774a
Fix a possible NPE, caused by loation manager has Main activity refer…
neslihanturan Nov 4, 2018
5df172e
Change hardcoded string with var from string xml
neslihanturan Nov 4, 2018
6e28e5f
Make sure you listen storage permissions from contribution list framg…
neslihanturan Nov 5, 2018
55ae9df
Make sure you listened storage permissions for Neaby fragment buttons…
neslihanturan Nov 5, 2018
59cdc88
Check NPEs causing crashes. Now it does not crash after coming back f…
neslihanturan Nov 5, 2018
075db5a
Make notification icon compatible with <API19 devices, by drawing and…
neslihanturan Nov 6, 2018
ab02dd9
Change back icon arrow vector with png
neslihanturan Nov 6, 2018
3a5bbb1
Attempt to solve location manager caused memory leak
neslihanturan Nov 6, 2018
64164dd
Fix memory leaks and optimize imports
neslihanturan Nov 8, 2018
c35e926
Merge 2.9 release
neslihanturan Nov 9, 2018
6c2785d
Fix conflicts
neslihanturan Nov 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</activity>

<activity
android:name=".contributions.ContributionsActivity"
android:name=".contributions.MainActivity"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" />

Expand All @@ -80,17 +80,12 @@
<activity
android:name=".AboutActivity"
android:label="@string/title_activity_about"
android:parentActivityName=".contributions.ContributionsActivity" />
android:parentActivityName=".contributions.MainActivity" />

<activity
android:name=".auth.SignupActivity"
android:label="@string/title_activity_signup" />

<activity
android:name=".nearby.NearbyActivity"
android:label="@string/title_activity_nearby"
android:parentActivityName=".contributions.ContributionsActivity" />

<activity
android:name=".notification.NotificationActivity"
android:label="@string/navigation_item_notification" />
Expand All @@ -104,18 +99,18 @@
<activity
android:name=".category.CategoryImagesActivity"
android:label="@string/title_activity_featured_images"
android:parentActivityName=".contributions.ContributionsActivity" />
android:parentActivityName=".contributions.MainActivity" />

<activity
android:name=".category.CategoryDetailsActivity"
android:label="@string/title_activity_featured_images"
android:parentActivityName=".contributions.ContributionsActivity" />
android:parentActivityName=".contributions.MainActivity" />

<activity
android:name=".explore.SearchActivity"
android:label="@string/title_activity_search"
android:configChanges="orientation|keyboardHidden"
android:parentActivityName=".contributions.ContributionsActivity"
android:parentActivityName=".contributions.MainActivity"
/>

<activity
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/fr/free/nrw/commons/auth/LoginActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.WelcomeActivity;
import fr.free.nrw.commons.category.CategoryImagesActivity;
import fr.free.nrw.commons.contributions.ContributionsActivity;
import fr.free.nrw.commons.contributions.MainActivity;
import fr.free.nrw.commons.di.ApplicationlessInjection;
import fr.free.nrw.commons.mwapi.MediaWikiApi;
import fr.free.nrw.commons.theme.NavigationBaseActivity;
Expand Down Expand Up @@ -415,7 +415,7 @@ public void emptySensitiveEditFields() {
}

public void startMainActivity() {
NavigationBaseActivity.startActivityWithFlags(this, ContributionsActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP);
NavigationBaseActivity.startActivityWithFlags(this, MainActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP);
finish();
}

Expand Down
Loading