summaryrefslogtreecommitdiffstats
path: root/mobile/android/geckoview_example/src/main/res/layout
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /mobile/android/geckoview_example/src/main/res/layout
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/geckoview_example/src/main/res/layout')
-rw-r--r--mobile/android/geckoview_example/src/main/res/layout/activity_settings.xml24
-rw-r--r--mobile/android/geckoview_example/src/main/res/layout/browser_action.xml32
-rw-r--r--mobile/android/geckoview_example/src/main/res/layout/browser_action_popup.xml13
-rw-r--r--mobile/android/geckoview_example/src/main/res/layout/geckoview_activity.xml32
4 files changed, 101 insertions, 0 deletions
diff --git a/mobile/android/geckoview_example/src/main/res/layout/activity_settings.xml b/mobile/android/geckoview_example/src/main/res/layout/activity_settings.xml
new file mode 100644
index 0000000000..d6c4025ea6
--- /dev/null
+++ b/mobile/android/geckoview_example/src/main/res/layout/activity_settings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/colorBackgroundDark"
+ app:theme="@style/ToolBarStyle"
+ android:elevation="4dp"/>
+
+ <FrameLayout
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:background="@color/colorPrimaryDark"/>
+
+</LinearLayout>
diff --git a/mobile/android/geckoview_example/src/main/res/layout/browser_action.xml b/mobile/android/geckoview_example/src/main/res/layout/browser_action.xml
new file mode 100644
index 0000000000..fa06e95e88
--- /dev/null
+++ b/mobile/android/geckoview_example/src/main/res/layout/browser_action.xml
@@ -0,0 +1,32 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="?android:actionBarSize"
+ android:layout_height="?android:actionBarSize"
+ android:gravity="center"
+ android:orientation="vertical">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ >
+ <ImageView
+ android:id="@+id/browser_action_icon"
+ android:layout_width="36dp"
+ android:layout_height="36dp"
+ android:layout_centerInParent="true"
+ />
+ </RelativeLayout>
+
+ <TextView
+ android:id="@+id/browser_action_badge"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@drawable/rounded_bg"
+ android:textColor="@color/colorPrimaryDark"
+ android:layout_alignParentRight="true"
+ android:paddingLeft="3dp"
+ android:paddingRight="3dp"
+ android:layout_marginTop="3dp"
+ android:layout_marginRight="3dp"
+ android:text="12"
+ />
+</RelativeLayout>
diff --git a/mobile/android/geckoview_example/src/main/res/layout/browser_action_popup.xml b/mobile/android/geckoview_example/src/main/res/layout/browser_action_popup.xml
new file mode 100644
index 0000000000..a1bb627d17
--- /dev/null
+++ b/mobile/android/geckoview_example/src/main/res/layout/browser_action_popup.xml
@@ -0,0 +1,13 @@
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <org.mozilla.geckoview.GeckoView
+ android:id="@+id/gecko_view_popup"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scrollbars="none"
+ />
+</RelativeLayout>
diff --git a/mobile/android/geckoview_example/src/main/res/layout/geckoview_activity.xml b/mobile/android/geckoview_example/src/main/res/layout/geckoview_activity.xml
new file mode 100644
index 0000000000..8ee4a615a9
--- /dev/null
+++ b/mobile/android/geckoview_example/src/main/res/layout/geckoview_activity.xml
@@ -0,0 +1,32 @@
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/main"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <org.mozilla.geckoview_example.NestedGeckoView
+ android:id="@+id/gecko_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scrollbars="none"
+ app:layout_behavior="org.mozilla.geckoview_example.GeckoViewBottomBehavior"
+ />
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="?android:actionBarSize"
+ android:layout_gravity="bottom"
+ android:background="#eeeeee"
+ app:layout_behavior="org.mozilla.geckoview_example.ToolbarBottomBehavior"
+ app:layout_scrollFlags="scroll|enterAlways|snap|exitUntilCollapsed" />
+
+ <ProgressBar
+ android:id="@+id/page_progress"
+ style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="3dp"
+ android:layout_alignTop="@id/gecko_view" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout>