Skip to content

Commit

Permalink
Implement basic web browser (#10)
Browse files Browse the repository at this point in the history
* Remove old project and add start basic project.

- Delete the old light version of the app.
- Create new project targeting and compiling to the latest SDK and build tools (25 / 25.0.2) with minSdk 16, latest AppCompat (25.3.1) and Gradle plugin.
- Edit travis config file to use latest tools.
- Set up a simple activity with a working WebView and basic edit text to load websites and DDG searches.

* Make travis build the app

* Remove unused dependencies

* Some more work on the project and browser

- Add theme xml file
- Correctly set back/forward menu button visibility and handle the back button press
- Add custom WebViewClient to handle onStart and onFinish page events

* Add basic support for Intent action: VIEW, WEB_SEARCH and ASSIST.

* More work on base browser and build process:

- Add lint check and fail builds on lint errors and warnings.
- Fix all the lint errors and warnings.
- Style a little the Appbar, set proper url or DDG query when browsing.
- Disable the refresh button on startup when there's nothing to refresh
- Set configChanges in the main activity to prevent the WebView to reload on every rotation change (we'll see if there's a better way to preserve the state without using this)

* Change DDGUrHelper class to AppUrls similar to iOS and add some unit tests

* Architecture and tests work:

- Removed base interfaces for view and presenter, move to a light MVP implementation. Inject the presenter from a temp static Map.
- Add some basic test for the browser presenter.
- Add a progress bar when a page is loading.

* Add tests for UrlUtils class, and for progress changes in the browser presenter

* Clean dependencies, and test files, clean travis config file.
- Remove unused espresso dependency and base test.
- Remove loading emulator in the travis config file and run "./gradlew clean build".
- Add few more tests
- Add @nullable and @nonnull annotation to the interfaces.

* Move colors from layout to color xml value file

* Remove unused imports

* Make hardcoded progress in the BrowserPresenterImpl a constant, remove comment and handle ACTION_DOWN and KEYCODE_ENTER in BrowserFragment, make activity fields private.

* Handle catch statement, use assertTrue and assertFasle in test, split shouldHandleBackButtonCorrectly in two different tests

* Change all test names to be in line with the "when<SomeCondition>Then<Expectation>"

* Start with Omnibar menu items disabled, the presenter will enable items when they will be available during the session

* Rename two tests with the wrong naming

* Move WebView.onDestroy() in Fragment.OnDestroyView: to avoid crash in the emulator when pressing the back button. We should destroy the view when all the other view are destroyed rather then just onDestroy.

* Fix url not loading in API >= 24, switch shouldOverrideUrlLoading to return false, not true!

* Remove all .idea/ files already in gitignore from the repo

* Format all code to defaults
  • Loading branch information
fgei committed May 29, 2017
1 parent 390821a commit d8e10bc
Show file tree
Hide file tree
Showing 426 changed files with 1,341 additions and 12,490 deletions.
21 changes: 0 additions & 21 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

21 changes: 0 additions & 21 deletions .idea/gradle.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/acra_4_5_0.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/libraries/appcompat_v7_23_1_1.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/libraries/espresso_core_2_2_2.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/libraries/espresso_idling_resource_2_2_2.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/libraries/exposed_instrumentation_api_publish_0_5.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/hamcrest_core_1_3.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/hamcrest_integration_1_3.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/hamcrest_library_1_3.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/httpclientandroidlib_1_2_1.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/javawriter_2_1_1.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/javax_annotation_api_1_2.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/javax_inject_1.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/jsr305_2_0_1.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/junit_4_12.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/mockable_android_22.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/mockable_android_23.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/otto_1_3_8.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/picasso_2_5_2.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/libraries/preference_v7_23_1_1.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/libraries/recyclerview_v7_23_1_1.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/libraries/rules_0_5.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/libraries/runner_0_5.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/spongycastle_core_1_50_0_0.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/support_annotations_23_1_1.xml

This file was deleted.

16 changes: 0 additions & 16 deletions .idea/libraries/support_v4_23_1_1.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/markdown-navigator/profiles_settings.xml

This file was deleted.

0 comments on commit d8e10bc

Please sign in to comment.