https://github.com/kibotu/webviewadapter
Adapter for managing a single webview by bottom navigation.
https://github.com/kibotu/webviewadapter
adapter android bottom-navigation-view hacktoberfest tablayout webview
Last synced: about 1 month ago
JSON representation
Adapter for managing a single webview by bottom navigation.
- Host: GitHub
- URL: https://github.com/kibotu/webviewadapter
- Owner: kibotu
- License: apache-2.0
- Created: 2019-04-08T07:10:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-13T14:12:28.000Z (over 5 years ago)
- Last Synced: 2025-02-05T05:29:42.655Z (3 months ago)
- Topics: adapter, android, bottom-navigation-view, hacktoberfest, tablayout, webview
- Language: Kotlin
- Homepage:
- Size: 165 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.paypal.me/janrabe/5) [](https://about.me/janrabe)
# WebViewAdapter [](https://jitpack.io/#kibotu/WebViewAdapter) [](https://jitpack.io/#kibotu/WebViewAdapter) [](https://jitpack.io/com/github/kibotu/WebViewAdapter/master-SNAPSHOT/javadoc/index.html) [](https://travis-ci.org/kibotu/WebViewAdapter) [](https://android-arsenal.com/api?level=15) [](https://docs.gradle.org/current/release-notes) [](https://kotlinlang.org/) [](https://raw.githubusercontent.com/kibotu/WebViewAdapter/master/LICENSE) [](https://developer.android.com/topic/libraries/support-library/refactor)ActionBar like usability for a webview. Also modular handling of uri event handler.
### How to install
repositories {
maven {
url "https://jitpack.io"
}
}dependencies {
implementation 'com.github.kibotu:WebViewAdapter:-SNAPSHOT'
}### How to use
1 [prepare layout](app/src/main/res/layout/activity_main.xml#L10-L41)
2 [add adapter pages](app/src/main/java/net/kibotu/webviewadapter/app/MainActivity.kt#L34-L46)
adapter = WebViewPageAdapter(webView, tabLayout)
adapter.add(Tab("https://github.com/kibotu/RecyclerViewPresenter", R.string.tab_1, R.drawable.ic_edit_black_24dp, R.color.inactiveColorTint, R.color.colorPrimary))
adapter.add(Tab("https://github.com/kibotu/Heart-Rate-Ometer", R.string.tab_2, R.drawable.ic_edit_black_24dp, R.color.inactiveColorTint, R.color.colorPrimary))
adapter.add(Tab("https://github.com/kibotu/Android-PGP", R.string.tab_3, R.drawable.ic_edit_black_24dp, R.color.inactiveColorTint, R.color.colorPrimary))
adapter.add(Tab("https://github.com/kibotu/StreamingAndroidLogger", R.string.tab_4, R.drawable.ic_edit_black_24dp, R.color.inactiveColorTint, R.color.colorPrimary))
adapter.add(Tab("https://github.com/kibotu/KalmanRx", R.string.tab_5, R.drawable.ic_edit_black_24dp, R.color.inactiveColorTint, R.color.colorPrimary))adapter.notifyDataSetChanged()
3 [load intial url](app/src/main/java/net/kibotu/webviewadapter/app/MainActivity.kt#L51-L56)
adapter.selectCurrentItem(0)
(optional) [add onLoading Url callback](app/src/main/java/net/kibotu/webviewadapter/app/MainActivity.kt#L36)
adapter.onLoadUrl = { logv("onLoading $it") }
4 profit :)
### License
Copyright 2019 Jan RabeLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.