Skip to content

Commit

Permalink
Add Android support
Browse files Browse the repository at this point in the history
  • Loading branch information
rhanb committed Aug 21, 2017
1 parent 5e17df2 commit 12b580b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion demo-ng/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Component, ElementRef, ViewChild, AfterViewInit } from "@angular/core";
import { registerElement } from 'nativescript-angular';
import {
SwipeLayout,
SwipeLeftEventData,
SwipeDownEventData,
SwipeUpEventData,
SwipeRightEventData
} from 'nativescript-swipe-layout';
import {SwipeLayout} from './src';

import { ANIMATION_STATE, GESTURE_MODE } from 'nativescript-swipe-layout/swipe-layout.enums';
import { CardView } from 'nativescript-cardview';
import { TNSFontIconService } from 'nativescript-ngx-fonticon';
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-swipe-layout",
"version": "1.0.2",
"version": "1.0.3",
"description": "Easy Swipe Layout for NativeScript",
"main": "swipe-layout",
"typings": "index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions src/swipe-layout.android.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { SwipeLayoutBase, gestureModeProperty } from './swipe-layout.common';
import { GESTURE_MODE } from "./swipe-layout.enums";

declare var android;

export class SwipeLayout extends SwipeLayoutBase {
private _androidViewId: number;

Expand All @@ -10,8 +12,7 @@ export class SwipeLayout extends SwipeLayoutBase {


public createNativeView() {
this.nativeView = new android.view.View(this._context);
return this.nativeView;
return new android.widgets.LinearLayout(this._context)
}

public initNativeView() {
Expand Down

0 comments on commit 12b580b

Please sign in to comment.