/* Ċ Ġ* ĠCopyright Ġ( c ) Ġ 2 0 1 9 ĠS yg ic Ġa . s . ĠAll Ġrights Ġreserved . Ċ Ġ* Ċ Ġ* ĠThis Ġproject Ġis Ġlicensed Ġunder Ġthe ĠMIT ĠLicense . Ċ Ġ* Ċ Ġ* ĠPermission Ġis Ġhereby Ġgranted , Ġfree Ġof Ġcharge , Ġto Ġany Ġperson Ġobtaining Ġa Ġcopy Ċ Ġ* Ġof Ġthis Ġsoftware Ġand Ġassociated Ġdocumentation Ġfiles Ġ( the Ġ" Software "), Ġto Ġdeal Ċ Ġ* Ġin Ġthe ĠSoftware Ġwithout Ġrestriction , Ġincluding Ġwithout Ġlimitation Ġthe Ġrights Ċ Ġ* Ġto Ġuse , Ġcopy , Ġmodify , Ġmerge , Ġpublish , Ġdistribute , Ġsublicense , Ġand / or Ġsell Ċ Ġ* Ġcopies Ġof Ġthe ĠSoftware , Ġand Ġto Ġpermit Ġpersons Ġto Ġwhom Ġthe ĠSoftware Ġis Ċ Ġ* Ġfurnished Ġto Ġdo Ġso , Ġsubject Ġto Ġthe Ġfollowing Ġconditions : Ċ Ġ* Ċ Ġ* ĠThe Ġabove Ġcopyright Ġnotice Ġand Ġthis Ġpermission Ġnotice Ġshall Ġbe Ġincluded Ġin Ġall Ċ Ġ* Ġcopies Ġor Ġsubstantial Ġportions Ġof Ġthe ĠSoftware . Ċ Ġ* Ċ Ġ* ĠTHE ĠSOFTWARE ĠIS ĠPROVIDED Ġ" AS ĠIS ", ĠWITHOUT ĠWARRANTY ĠOF ĠANY ĠKIND , ĠEXPRESS ĠOR Ċ Ġ* ĠIMPLIED , ĠINCLUDING ĠBUT ĠNOT ĠLIMITED ĠTO ĠTHE ĠWARRANTIES ĠOF ĠMERCHANTABILITY , Ċ Ġ* ĠFITNESS ĠFOR ĠA ĠPARTICULAR ĠPURPOSE ĠAND ĠNONINFRINGEMENT . ĠIN ĠNO ĠEVENT ĠSHALL ĠTHE Ċ Ġ* ĠAUTHORS ĠOR ĠCOPYRIGHT ĠHOLDERS ĠBE ĠLIABLE ĠFOR ĠANY ĠCLAIM , ĠDAMAGES ĠOR ĠOTHER Ċ Ġ* ĠLIABILITY , ĠWHETHER ĠIN ĠAN ĠACTION ĠOF ĠCONTRACT , ĠTORT ĠOR ĠOTHERWISE , ĠARISING ĠFROM , Ċ Ġ* ĠOUT ĠOF ĠOR ĠIN ĠCONNECTION ĠWITH ĠTHE ĠSOFTWARE ĠOR ĠTHE ĠUSE ĠOR ĠOTHER ĠDEALINGS ĠIN ĠTHE Ċ Ġ* ĠSOFTWARE . Ċ Ġ*/ Ċ Ċ package Ġcom . sy g ic . samples . app . view models Ċ Ċ import Ġandroid . view . MenuItem Ċ import Ġandroidx . appcompat . app . AppCompat Dialog Fragment Ċ import Ġandroidx . lifecycle . Default Lifecycle Observer Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . google . android . material . navigation . Navigation View Ċ import Ġcom . sy g ic . maps . u ikit . views . common . extensions . as Single Event Ċ import Ġcom . sy g ic . maps . u ikit . views . common . li ved ata . Single Live Event Ċ import Ġcom . sy g ic . samples . Build Config Ċ import Ġcom . sy g ic . samples . R Ċ import Ġcom . sy g ic . samples . app . dialogs . About Dialog Ċ import Ġcom . sy g ic . samples . app . fragments .* Ċ Ċ private Ġconst Ġval ĠG ITHUB _ WI KI _ COMP ASS Ġ= Ġ"${ Build Config . GITHUB _ WI KI } Ui Kit - Comp ass " Ċ private Ġconst Ġval ĠG ITHUB _ WI KI _ PLACE _ DETAIL Ġ= Ġ"${ Build Config . GITHUB _ WI KI } Ui Kit - Place - Detail " Ċ private Ġconst Ġval ĠG ITHUB _ WI KI _ POSITION _ LOCK _ FAB Ġ= Ġ"${ Build Config . GITHUB _ WI KI } Ui Kit - Position - Lock - Fab " Ċ private Ġconst Ġval ĠG ITHUB _ WI KI _ ZO OM _ CONTRO LS Ġ= Ġ"${ Build Config . GITHUB _ WI KI } Ui Kit - Zoom - Controls " Ċ private Ġconst Ġval ĠG ITHUB _ WI KI _ SEARCH _ TOOL BAR Ġ= Ġ"${ Build Config . GITHUB _ WI KI } Ui Kit - Search - Toolbar " Ċ private Ġconst Ġval ĠG ITHUB _ WI KI _ SEARCH _ RESULT _ LIST Ġ= Ġ"${ Build Config . GITHUB _ WI KI } Ui Kit - Search - Result - List " Ċ Ċ class ĠSamples Activity ViewModel Ġ: ĠViewModel (), ĠDefault Lifecycle Observer , ĠNavigation View . On Navigation ItemSelected Listener Ġ{ ĊĊĠĠĠ Ġval Ġdrawer Opened Observable : ĠLive Data < Boolean > Ġ= ĠSingle Live Event () ĊĠĠĠ Ġval Ġdrawer Item Check Observable : ĠLive Data < Int > Ġ= ĠSingle Live Event () ĊĠĠĠ Ġval Ġsamples List Fragments Observable : ĠLive Data < Base Samples List Fragment > Ġ= ĠSingle Live Event () ĊĠĠĠ Ġval Ġopen Link In Browser Observable : ĠLive Data < String > Ġ= ĠSingle Live Event () ĊĠĠĠ Ġval Ġopen Dialog Fragment Observable : ĠLive Data < Class < out ĠAppCompat Dialog Fragment >> Ġ= ĠSingle Live Event () ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġdrawer Item Check Observable . as Single Event (). value Ġ= ĠR . id . nav _ demos ĊĠĠĠĠĠĠĠ Ġsamples List Fragments Observable . as Single Event (). value Ġ= ĠDemo Sample List Fragment () ĊĠĠĠĠĠĠĠ Ġdrawer Opened Observable . as Single Event (). value Ġ= Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Navigation ItemSelected ( item : ĠMenuItem ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen Ġ( item . itemId ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ demos Ġ-> Ġsamples List Fragments Observable . as Single Event (). value Ġ= ĠDemo Sample List Fragment () ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ browse _ map _ module Ġ-> Ġsamples List Fragments Observable . as Single Event (). value Ġ= ĠB rowse Map Sample List Fragment () ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ search _ module Ġ-> Ġsamples List Fragments Observable . as Single Event (). value Ġ= ĠSearch Sample List Fragment () ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ navigation _ module Ġ-> Ġsamples List Fragments Observable . as Single Event (). value Ġ= ĠNavigation Sample List Fragment () ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ ui _ kit _ compass Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠG ITHUB _ WI KI _ COMP ASS ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ ui _ kit _ place _ detail Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠG ITHUB _ WI KI _ PLACE _ DETAIL ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ ui _ kit _ position _ lock _ fab Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠG ITHUB _ WI KI _ POSITION _ LOCK _ FAB ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ ui _ kit _ zoom _ controls Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠG ITHUB _ WI KI _ ZO OM _ CONTRO LS ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ ui _ kit _ search _ toolbar Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠG ITHUB _ WI KI _ SEARCH _ TOOL BAR ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ ui _ kit _ search _ result _ list Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠG ITHUB _ WI KI _ SEARCH _ RESULT _ LIST ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ source _ code Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠBuild Config . GITHUB _ REPO ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ wiki Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠBuild Config . GITHUB _ WI KI ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR . id . nav _ qa Ġ-> Ġopen Link In Browser Observable . as Single Event (). value Ġ= ĠBuild Config . STACK _ OVER FLOW ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġdrawer Opened Observable . as Single Event (). value Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Options ItemSelected ( menu ItemId : ĠInt ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( menu ItemId Ġ== ĠR . id . about ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġopen Dialog Fragment Observable . as Single Event (). value Ġ= ĠAbout Dialog :: class . java ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġfalse ĊĠĠĠ Ġ} Ċ }