WIP: [android] Improve phone fragment #7259

Draft
Jean-BaptisteC wants to merge 1 commit from Jean-BaptisteC/phone_fab into master
Jean-BaptisteC commented 2024-01-28 14:47:44 +00:00 (Migrated from github.com)

This PR adds:

  • Phone FAB instead textview to add new phone number
  • Improve how the keyboard is managed

Following suggestion mentioned here

TODO:

  • Give focus to the last item of recycler view
  • Close keyboard when user cancel or apply changes -> need to be tested on old devices
This PR adds: - Phone FAB instead textview to add new phone number - Improve how the keyboard is managed Following suggestion mentioned [here](https://git.omaps.dev/organicmaps/organicmaps/pulls/6765#issuecomment-1846135967) TODO: - [ ] Give focus to the last item of recycler view - [ ] Close keyboard when user cancel or apply changes -> need to be tested on old devices
biodranik (Migrated from github.com) reviewed 2024-01-28 20:20:01 +00:00
biodranik (Migrated from github.com) left a comment
2024-01-28 22:19:19.034  3804-3804  AndroidRuntime          app.organicmaps.debug                E  FATAL EXCEPTION: main
                                                                                                    Process: app.organicmaps.debug, PID: 3804
                                                                                                    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.requestFocus()' on a null object reference
                                                                                                    	at app.organicmaps.editor.data.PhoneFragment.onViewCreated(PhoneFragment.java:57)
                                                                                                    	at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3147)
                                                                                                    	at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:588)
                                                                                                    	at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:272)
                                                                                                    	at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1943)
                                                                                                    	at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1839)
                                                                                                    	at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1782)
                                                                                                    	at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:565)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:739)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                                    	at android.os.Looper.loop(Looper.java:135)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:5221)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                                    	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
``` 2024-01-28 22:19:19.034 3804-3804 AndroidRuntime app.organicmaps.debug E FATAL EXCEPTION: main Process: app.organicmaps.debug, PID: 3804 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.requestFocus()' on a null object reference at app.organicmaps.editor.data.PhoneFragment.onViewCreated(PhoneFragment.java:57) at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3147) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:588) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:272) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1943) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1839) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1782) at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:565) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) ```
@ -22,3 +24,4 @@
final Integer maxAdapter = 5;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
biodranik (Migrated from github.com) commented 2024-01-28 20:17:55 +00:00
  public boolean onBackPressed()
  {
```suggestion public boolean onBackPressed() { ```
This repo is archived. You cannot comment on pull requests.
No reviewers
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#7259
No description provided.