{"id":50729414,"url":"https://github.com/kibotu/webviewbottomsheet","last_synced_at":"2026-06-10T07:03:37.433Z","repository":{"id":363327900,"uuid":"1262844978","full_name":"kibotu/WebViewBottomSheet","owner":"kibotu","description":"A clean Android demo showcasing WebView integration within a Material Design Bottom Sheet. Perfect reference for embedding web content with native UX patterns.","archived":false,"fork":false,"pushed_at":"2026-06-08T11:57:05.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T13:23:16.587Z","etag":null,"topics":["android","android-kotlin","android-webview","bottom-sheet","jetpack-compose","mobile-development","modal","nestedscrolling","webview"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kibotu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"kibotu","buy_me_a_coffee":"kibotu","custom":"https://paypal.me/janrabe/5"}},"created_at":"2026-06-08T11:28:34.000Z","updated_at":"2026-06-08T11:59:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kibotu/WebViewBottomSheet","commit_stats":null,"previous_names":["kibotu/webviewbottomsheet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kibotu/WebViewBottomSheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kibotu%2FWebViewBottomSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kibotu%2FWebViewBottomSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kibotu%2FWebViewBottomSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kibotu%2FWebViewBottomSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kibotu","download_url":"https://codeload.github.com/kibotu/WebViewBottomSheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kibotu%2FWebViewBottomSheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34140776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-kotlin","android-webview","bottom-sheet","jetpack-compose","mobile-development","modal","nestedscrolling","webview"],"created_at":"2026-06-10T07:03:32.698Z","updated_at":"2026-06-10T07:03:37.428Z","avatar_url":"https://github.com/kibotu.png","language":"Kotlin","funding_links":["https://github.com/sponsors/kibotu","https://buymeacoffee.com/kibotu","https://paypal.me/janrabe/5"],"categories":[],"sub_categories":[],"readme":"# WebView Bottom Sheet Demo\n[![Build](https://github.com/kibotu/WebViewBottomSheet/actions/workflows/build.yml/badge.svg)](https://github.com/kibotu/WebViewBottomSheet/actions/workflows/build.yml)\n\n---\n\n## 🚀 What is WebView Bottom Sheet?\n\n**WebView Bottom Sheet** is a clean, minimal demonstration of Android's powerful `WebView` component housed within a Material Design **Bottom Sheet**. It showcases how to elegantly integrate web content into your native Android app while maintaining a modern, user-friendly interface.\n\nThis project serves as a reference implementation for developers exploring the intersection of native Android development and web technologies.\n\n---\n\n## 💡 Why Use WebView in a Bottom Sheet?\n\n### The Problem\n\nMany Android developers struggle with:\n- ✅ Seamlessly embedding web views\n- ✅ Managing memory and lifecycle correctly\n- ✅ Creating intuitive user interactions\n- ✅ Maintaining native app feel\n\n### The Solution\n\nA beautifully crafted example demonstrating best practices for:\n- 📱 **Native-feeling UI** — Bottom sheets slide smoothly from the bottom\n- 🔄 **Proper lifecycle management** — WebView handles pause/resume/destroy correctly\n- 🎨 **Material Design 3** — Modern, polished aesthetics\n- ⚡ **Performance** — Optimized memory and resource usage\n- 🌐 **Full web support** — JavaScript, DOM, media playback enabled\n\n---\n\n## 🎥 Demo Video\n\n[![Demo](https://github.com/user-attachments/assets/27b3e23c-0172-4462-a797-dcb884ad5817)](https://github.com/user-attachments/assets/27b3e23c-0172-4462-a797-dcb884ad5817)\n\n---\n\n## ✨ Key Features\n\n| Feature | Description |\n|---------|-------------|\n| **Material Design 3** | Modern Material You theming with custom colors |\n| **Bottom Sheet Dialog** | Smooth, gesture-driven animations |\n| **Full WebView Support** | JavaScript, DOM storage, zoom controls |\n| **Edge-to-Edge Display** | Immersive UI experience |\n| **Proper Cleanup** | Memory-efficient WebView destruction |\n| **Intercept Handling** | Parent scroll intercept logic |\n| **Transparent Background** | Clean visual integration |\n\n---\n\n### Core Dependencies\n\n- **AndroidX Core** — Foundation utilities\n- **Jetpack Compose** — Modern UI toolkit\n- **Material 3 Components** — Beautiful UI elements\n- **WebView** — Full web rendering capabilities\n- **Fragment** — Bottom sheet dialog support\n\n---\n\n## 📦 Getting Started\n\n### Prerequisites\n\n- **Android Studio** — Arctic Fox 2020.3.1 or later\n- **JDK 17** — Required for compilation\n- **Android SDK** — API 24+ (minSdk)\n- **Git** — For cloning the repository\n\n### Quick Start\n\n```bash\n# Clone the repository\ngit clone https://github.com/kibotu/WebViewBottomSheet.git\ncd WebViewBottomSheet\n\n# Install dependencies\n./gradlew dependencies\n\n# Build debug APK\n./gradlew assembleDebug\n\n# Install on device\nadb install app/build/outputs/apk/debug/app-debug.apk\n```\n\n### Build Configuration\n\nThe project uses:\n- **Kotlin DSL** — Modern build scripting\n- **Gradle Caching** — Optimized build times\n- **Daemon Enabled** — Faster incremental builds\n- **Configuration Cache** — Consistent builds across environments\n\n---\n\n## 🚀 Installation\n\n### Debug Build\n\n1. Connect your device or start an emulator\n2. Run the app:\n   ```bash\n   ./gradlew installDebug\n   ```\n\n### Release Build\n\n```bash\n./gradlew assembleRelease\n```\n\n\u003e **Note:** Release builds require signing configuration in `local.properties`\n\n### Deploy to Device\n\n```bash\n# Install APK\nadb install app/build/outputs/apk/debug/app-debug.apk\n\n# Install and replace\nadb install -r app/build/outputs/apk/debug/app-debug.apk\n```\n\n---\n\n## 🎯 How It Works\n\n### Architecture Overview\n\n```\nMainActivity\n├── StartScreen (Compose UI)\n└── WebViewBottomSheetFragment (Bottom Sheet Dialog)\n    └── WebView (Full web rendering)\n```\n\n### Key Implementation Details\n\n#### Bottom Sheet Dialog\n\n```kotlin\nclass WebViewBottomSheetFragment : BottomSheetDialogFragment() {\n    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog =\n        BottomSheetDialog(requireContext(), R.style.WebViewBottomSheet)\n}\n```\n\n#### WebView Configuration\n\n```kotlin\nweb.settings.apply {\n    javaScriptEnabled = true\n    domStorageEnabled = true\n    loadWithOverviewMode = true\n    useWideViewPort = true\n    mediaPlaybackRequiresUserGesture = false\n}\n```\n\n#### Lifecycle Management\n\n```kotlin\noverride fun onDestroyView() {\n    webView?.apply {\n        stopLoading()\n        loadUrl(\"about:blank\")\n        (parent as? ViewGroup)?.removeView(this)\n        destroy()\n    }\n    webView = null\n}\n```\n\n---\n\n## 📁 Project Structure\n\n```\nWebViewBottomSheet/\n├── app/\n│   ├── src/\n│   │   └── main/\n│   │       ├── java/net/kibotu/webviewbottomsheet/\n│   │       │   ├── MainActivity.kt\n│   │       │   └── WebViewBottomSheetFragment.kt\n│   │       ├── res/\n│   │       │   ├── layout/\n│   │       │   │   └── fragment_webview_bottom_sheet.xml\n│   │       │   ├── values/\n│   │       │   │   ├── colors.xml\n│   │       │   │   ├── strings.xml\n│   │       │   │   └── themes.xml\n│   │       │   └── xml/\n│   │       │       ├── backup_rules.xml\n│   │       │       └── data_extraction_rules.xml\n│   │       └── keepRules/\n│   │           └── rules.keep\n│   └── build.gradle.kts\n├── build.gradle.kts\n├── settings.gradle.kts\n└── gradle.properties\n```\n\n---\n\n## 🧪 Testing\n\n### Unit Tests\n\n```bash\n./gradlew test\n```\n\n### Instrumentation Tests\n\n```bash\n./gradlew connectedAndroidTest\n```\n\n### Linting\n\n```bash\n./gradlew lint\n```\n\n---\n\n## 🌐 Demo URL\n\nThe app loads: **https://trail.kibotu.net**\n\n\u003e This demonstrates a fully functional WebView with JavaScript and interactive content.\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Here's how you can help:\n\n1. **Fork** the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Code Style\n\n- ✅ Kotlin idiomatic patterns\n- ✅ Material Design guidelines\n- ✅ Android best practices\n- ✅ Clear, concise comments\n\n---\n\n## 📞 Support\n\nHaving issues or questions? Open an [issue](https://github.com/kibotu/WebViewBottomSheet/issues) on GitHub.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ by kibotu**\n\n\u003cdiv\u003e\n  \u003ca href=\"https://github.com/kibotu\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/GitHub-kibotu-181717?style=flat-square\u0026logo=github\" alt=\"GitHub\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkibotu%2Fwebviewbottomsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkibotu%2Fwebviewbottomsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkibotu%2Fwebviewbottomsheet/lists"}