nativescript-imagepicker icon indicating copy to clipboard operation
nativescript-imagepicker copied to clipboard

Imagepicker do not take 100% height

Open lyranis opened this issue 4 years ago • 1 comments

Make sure to check the demo app(s) for sample usage

Check

Make sure to check the existing issues in this repository

Check

Problem

The image picker, once opened, do not take 100% height of screen. There is a gap on the top of screen. Is this normal?

Which platform(s) does your issue occur on?

  • iOS

Please, provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it) 6.4.1 package.json:
{
  "nativescript": {
    "id": "xxx",
    "tns-android": {
      "version": "6.4.1"
    },
    "tns-ios": {
      "version": "6.4.0"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "@nativescript/theme": "~2.3.0",
    "nativescript-angular": "~8.21.0",
    "nativescript-imagepicker": "7.1.0",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.4.0",
    "tns-core-modules": "~6.4.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~8.2.0",
    "@ngtools/webpack": "~8.2.0",
    "nativescript-dev-webpack": "~1.5.0",
    "typescript": "~3.5.3"
  },
  "gitHead": "xxx",
  "readme": "NativeScript Application"
}

Please, tell us how to recreate the issue in as much detail as possible.

Create a simple app for IOS and open the picker.

Is there any code involved?

home.component.html

<ActionBar  flat="true" class="action-bar" backgroundColor="black"></ActionBar>
<Label dock="top" (tap)='onSelectSingleTap(2)'  text="Tape-me"></Label>

home.component.ts

import { Component, OnInit } from "@angular/core";
import * as imagepicker from "nativescript-imagepicker";


@Component({
    selector: "Home",
    templateUrl: "./home.component.html"
})
export class HomeComponent implements OnInit {

    constructor() {
        // Constructor
    }

    ngOnInit(): void {
        // init
    }


    onSelectSingleTap(imageIndex) {

        const context = imagepicker.create({
            mode: "single"
        });
        this.startSelection(context, imageIndex);
    }


    private startSelection(context, imageIndex) {
        // tslint:disable-next-line:no-this-assignment
        const that = this;

        context
            .authorize()
            .then(() => {
                return context.present();
            })
            .then((selection) => {

                // Do somethink


                // tslint:disable-next-line:only-arrow-functions
            }).catch(function (e) {
                console.log(e);

            });
    }
}

lyranis avatar Mar 18 '20 20:03 lyranis

screenshotTopOfScreen

lyranis avatar Mar 18 '20 20:03 lyranis