FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
NativeScript/apps/ui/src/main-page.ts at feat/css-env-safe-area · NativeScript/NativeScript · GitHub
NativeScript
NativeScript
Repository navigation
Code
Issues
224
(224)
Pull requests
96
(96)
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
NativeScript
/
apps
/
ui
/
src
/
main-page.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
54 lines (52 loc) · 2.48 KB
Breadcrumbs
NativeScript
/
apps
/
ui
/
src
/
main-page.ts
Copy path
File metadata and controls
54 lines (52 loc) · 2.48 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import
{
EventData
}
from
'@nativescript/core/data/observable'
;
import
{
MainPageViewModel
}
from
'./main-page-view-model'
;
import
{
Page
}
from
'@nativescript/core/ui/page'
;
import
{
WrapLayout
}
from
'@nativescript/core/ui/layouts/wrap-layout'
;
import
{
isAndroid
}
from
'@nativescript/core/platform'
;
export
function
pageLoaded
(
args
:
EventData
)
{
const
page
=
<
Page
>
args
.
object
;
const
wrapLayout
=
page
.
getViewById
<
WrapLayout
>
(
'wrapLayoutWithExamples'
)
;
const
examples
:
Map
<
string
,
string
>
=
new
Map
<
string
,
string
>
(
)
;
examples
.
set
(
'animation'
,
'animation/main-page'
)
;
examples
.
set
(
'action-bar'
,
'action-bar/main-page'
)
;
examples
.
set
(
'bindings'
,
'bindings/main-page'
)
;
examples
.
set
(
'button'
,
'button/main-page'
)
;
examples
.
set
(
'css'
,
'css/main-page'
)
;
examples
.
set
(
'dialogs'
,
'dialogs/main-page'
)
;
examples
.
set
(
'events'
,
'events/main-page'
)
;
examples
.
set
(
'fonts'
,
'fonts-tests/main-page'
)
;
examples
.
set
(
'flexbox'
,
'flexbox/flexbox-main-page'
)
;
examples
.
set
(
'htmlview'
,
'html-view/html-view-page'
)
;
examples
.
set
(
'image-view'
,
'image-view/main-page'
)
;
examples
.
set
(
'issues'
,
'issues/main-page'
)
;
examples
.
set
(
'layouts'
,
'layouts/main-page'
)
;
examples
.
set
(
'list-picker'
,
'list-picker/main-page'
)
;
examples
.
set
(
'list-view'
,
'list-view/main-page'
)
;
examples
.
set
(
'modalview'
,
'modal-view/modal-view-page'
)
;
examples
.
set
(
'page'
,
'page/main-page'
)
;
examples
.
set
(
'perf'
,
'perf/main-page'
)
;
examples
.
set
(
'scroll-view'
,
'scroll-view/main-page'
)
;
examples
.
set
(
'segmented-bar'
,
'segmented-bar/main-page'
)
;
examples
.
set
(
'search-bar'
,
'search-bar/main-page'
)
;
examples
.
set
(
'tab-view'
,
'tab-view/main-page'
)
;
examples
.
set
(
'timePicker'
,
'time-picker/time-picker-page'
)
;
examples
.
set
(
'text-field'
,
'text-field/main-page'
)
;
examples
.
set
(
'text-view'
,
'text-view/main-page'
)
;
examples
.
set
(
'webview'
,
'web-view/main-page'
)
;
examples
.
set
(
'progress-bar'
,
'progress-bar/main-page'
)
;
examples
.
set
(
'repeater'
,
'repeater/main-page'
)
;
examples
.
set
(
'date-picker'
,
'date-picker/date-picker-page'
)
;
examples
.
set
(
'nested-frames'
,
'nested-frames/main-page'
)
;
examples
.
set
(
'media-queries'
,
'media-queries/main-page'
)
;
examples
.
set
(
'screen-qualifiers'
,
'screen-qualifiers/main-page'
)
;
page
.
bindingContext
=
new
MainPageViewModel
(
wrapLayout
,
examples
)
;
const
parent
=
page
.
getViewById
(
'parentLayout'
)
;
const
searchBar
=
page
.
getViewById
(
'textView'
)
;
if
(
isAndroid
)
{
parent
.
android
.
setFocusableInTouchMode
(
true
)
;
parent
.
android
.
setFocusable
(
true
)
;
searchBar
.
android
.
clearFocus
(
)
;
}
else
{
parent
.
style
.
marginBottom
=
10
;
}
}
Back
|
FazBrowse Home
|
New Git URL