Skip to content

Commit

Permalink
🚧 Added open in browser button.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejaz4 committed Jan 9, 2022
1 parent a09d9a9 commit 133f4ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions app/src/main/java/co/dothq/browser/BrowserActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,19 @@ class BrowserActivity : AppCompatActivity() {
}

fun deepLinkActivitySetup() {
val deepLinkCloseButton = findViewById<LinearLayout>(R.id.closeButtonDeeplink);
val deeplinkHeader = findViewById<LinearLayout>(R.id.deeplinkAddressBar);
val browserHeader = findViewById<LinearLayout>(R.id.normalAddressbar);

deepLinkCloseButton.setOnClickListener {
val deeplinkCloseButton = findViewById<LinearLayout>(R.id.closeButtonDeeplink);
val deeplinkOpenInBrowserButton = findViewById<LinearLayout>(R.id.openInBrowserButtonDeeplink);

deeplinkCloseButton.setOnClickListener {
finish()
}

deeplinkOpenInBrowserButton.setOnClickListener {
browserHeader.visibility = View.VISIBLE;
deeplinkHeader.visibility = View.GONE;
}
}
}
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
</LinearLayout>

<LinearLayout
android:id="@+id/openInBrowserButtonDeeplink"
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_margin="2dp"
Expand Down

0 comments on commit 133f4ad

Please sign in to comment.