Skip to content

Commit

Permalink
Release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Grand committed Dec 17, 2019
1 parent 1205a27 commit 2269c68
Show file tree
Hide file tree
Showing 65 changed files with 1,636 additions and 546 deletions.
Empty file modified LICENSE
100644 → 100755
Empty file.
19 changes: 19 additions & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,25 @@ import "nativescript-getters";

> New methods have been added in the Frame, Page, tabs, layouts and texts classes. (see all [methods](#methods))
### Vue.js

The plugin may not work properly with these symlinked. It is because webpack resolves symlinks to their real locations by default.

A workaround for this issue is to manually disable symlinks resolution in webpack:

```javascript
const config = {
// ...
resolve: {
// ...
// resolve symlinks to symlinked modules
symlinks: false, // default: true
// ...
}
// ...
};
```

### Examples

#### Get views by tags
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

<!-- Application theme -->
<style name="AppTheme" parent="AppThemeBase">
<style name="AppThemeBase21" parent="AppThemeBase">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:datePickerStyle">@style/SpinnerDatePicker</item>
<item name="android:timePickerStyle">@style/SpinnerTimePicker</item>
</style>

<style name="AppTheme" parent="AppThemeBase21">
</style>

<!-- Default style for DatePicker - in spinner mode -->
<style name="SpinnerDatePicker" parent="android:Widget.Material.Light.DatePicker">
<item name="android:datePickerMode">spinner</item>
Expand All @@ -19,5 +23,6 @@

<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
<item name="android:elevation">4dp</item>
<item name="android:paddingTop">24dp</item>
</style>
</resources>
4 changes: 2 additions & 2 deletions demo-ng/App_Resources/Android/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<item name="colorAccent">@color/ns_accent</item>

<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowActionBarOverlay">true</item>

<item name="android:windowActionBarOverlay">true</item>
<item name="android:windowTranslucentStatus">true</item>
</style>

Expand Down
16 changes: 8 additions & 8 deletions demo-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"nativescript": {
"id": "org.nativescript.demong",
"tns-android": {
"version": "6.1.2"
"version": "6.2.0"
},
"tns-ios": {
"version": "6.1.0"
"version": "6.2.0"
}
},
"description": "NativeScript Application",
Expand All @@ -20,20 +20,20 @@
"@angular/platform-browser": "~8.2.0",
"@angular/platform-browser-dynamic": "~8.2.0",
"@angular/router": "~8.2.0",
"nativescript-angular": "~8.2.0",
"nativescript-getters": "^0.1.2",
"nativescript-theme-core": "~1.0.6",
"@nativescript/theme": "~2.2.0",
"nativescript-angular": "~8.20.0",
"nativescript-getters": "file:../src",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.4.0",
"tns-core-modules": "~6.1.0",
"tns-core-modules": "~6.2.3",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "~8.2.0",
"@ngtools/webpack": "~8.2.0",
"nativescript-dev-webpack": "~1.2.0",
"nativescript-dev-webpack": "~1.3.0",
"typescript": "~3.5.3"
},
"gitHead": "1964ea9e8ca1a0518e0d6370781eedcf6c23db42",
"gitHead": "a6fec076a20f898feabb4466a2c411158c18a100",
"readme": "NativeScript Application"
}
73 changes: 61 additions & 12 deletions demo-ng/src/app.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,69 @@
@import "~@nativescript/theme/css/core.css";
@import "~@nativescript/theme/css/default.css";

/*
ICONS FONT
*/

.fas {
font-family: "Font Awesome 5 Free", "fa-solid-900";
font-weight: 900;
}

/*
In NativeScript, the app.css file is where you place CSS rules that
you would like to apply to your entire application. Check out
http://docs.nativescript.org/ui/styling for a full list of the CSS
selectors and properties you can use to style UI components.
LAYOUTS
*/

StackLayout,
WrapLayout {
horizontal-align: center;
}

/*
In many cases you may want to use the NativeScript core theme instead
of writing your own CSS rules. For a full list of class names in the theme
refer to http://docs.nativescript.org/ui/theme.
IMAGES
*/
@import '~nativescript-theme-core/css/core.light.css';

Image {
width: 50;
height: 50;
load-mode: async;
}

Image + Image {
margin-left: 10;
}

/*
For example, the following CSS rule changes the font size of all UI
components that have the btn class name.
PICKERS
*/
.btn {
font-size: 18;

DatePicker,
TimePicker {
height: 80;
}

DatePicker + TimePicker {
margin-left: 10;
}

/*
TEXTS
*/

TextField,
TextView {
padding: 10;
border-width: 1;
border-style: solid;
border-color: black;
border-radius: 10;
placeholder-color: gray;
}

/*
SLIDER
*/

Slider {
width: 100%;
}
90 changes: 65 additions & 25 deletions demo-ng/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,80 @@
<ActionBar class="action-bar">
<Label class="action-bar-title" text="Home"></Label>
<!-- GET VIEWS BY TAG -->
<ActionBar title="Home">

<ActionItem icon="font://&#xf121;" ios.position="right"></ActionItem>
<ActionItem icon="font://&#xf188;" ios.position="right"></ActionItem>
<ActionItem icon="font://&#xf0f4;" ios.position="right"></ActionItem>

</ActionBar>

<StackLayout id="main" class="page">
<!-- Add your page content here -->
<ScrollView>
<!-- GET VIEWS BY TYPE -->
<StackLayout (loaded)="onLayoutLoaded($event)">

<Label text="First name:"></Label>
<TextField hint="First name..." class="bold"></TextField>
<!-- GET VIEWS BY TAGS -->
<StackLayout>

<Label text="Last name:"></Label>
<TextField hint="Last name..." class="italic"></TextField>
<!-- GET VIEWS BY VALUE PAIRS -->
<Image src="https://upload.wikimedia.org/wikipedia/commons/4/4f/NativeScript_logo.png" stretch="none"></Image>
<Image src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Unofficial_JavaScript_logo_2.svg/200px-Unofficial_JavaScript_logo_2.svg.png" stretch="none"></Image>
<Image src="https://raw.githubusercontent.com/remojansen/logo.ts/master/ts.png" stretch="none"></Image>

</StackLayout>

<Label text="Description:"></Label>
<TextView hint="Description..."></TextView>
<WrapLayout>

<StackLayout>
<!-- GET VIEWS BY VALUE PAIRS -->
<Image src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Angular_full_color_logo.svg/200px-Angular_full_color_logo.svg.png" stretch="fill"></Image>
<Image src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Vue.js_Logo_2.svg/200px-Vue.js_Logo_2.svg.png" stretch="fill"></Image>

<Label text="Address:"></Label>
<TextView hint="Address..."></TextView>
</WrapLayout>

<Label text="Website:"></Label>
<TextField hint="Website..." keyboardType="url"></TextField>
<!-- GET VIEWS BY TYPES -->
<GridLayout columns="*, *" rows="auto">

<StackLayout id="contact">
<DatePicker col="0" row="0"></DatePicker>
<TimePicker col="1" row="0"></TimePicker>

</GridLayout>

<Label text="Email:"></Label>
<TextField hint="Email..." keyboardType="email"></TextField>
<TextField hint="Email..."></TextField>
<TextView hint="Description..."></TextView>

<Label text="Phone number:"></Label>
<TextField hint="Phone number..." keyboardType="phone"></TextField>
<!-- GET VIEWS BY PROPERTY -->
<FlexboxLayout flexDirection="column">

<!-- GET VIEWS BY CLASS -->
<Label text="Lorem ipsum 1" class="h1"></Label>
<Label text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." textWrap="true"></Label>

</StackLayout>
<Label text="Lorem ipsum 2" class="h1"></Label>
<Label text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." textWrap="true"></Label>

</StackLayout>
<StackLayout>

<!-- GET VIEWS BY VALUE PAIR -->
<Switch checked="true"></Switch>
<Switch checked="false"></Switch>
<Switch checked="false"></Switch>

<Label text="Password:"></Label>
<TextField hint="Password..." secure="true"></TextField>
</StackLayout>

</StackLayout>
</FlexboxLayout>

<StackLayout>
<StackLayout>
<StackLayout>
<StackLayout>
<StackLayout>

<!-- GET VIEW BY IDENTIFIER -->
<Slider id="mySlider" value="1" minValue="0" maxValue="10"></Slider>

</StackLayout>
</StackLayout>
</StackLayout>
</StackLayout>
</StackLayout>

</StackLayout>
</ScrollView>
Loading

0 comments on commit 2269c68

Please sign in to comment.