This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install file chooser and file transfer API from ionic 2 and import them into your page.ts. and don't forget to add providers in | |
app.component.ts | |
import { Component } from '@angular/core'; | |
import { NavController, NavParams} from 'ionic-angular'; | |
import { Home } from '../../homemodule/home'; | |
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
import { UserProfileService } from '../../services/login.service'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void fitToScreen(){ | |
mSaveScale = 1; | |
float scale; | |
Drawable drawable = getDrawable(); | |
if (drawable == null || drawable.getIntrinsicWidth() == 0 | |
|| drawable.getIntrinsicHeight() == 0) | |
return; | |
int bmWidth = drawable.getIntrinsicWidth(); | |
int bmHeight = drawable.getIntrinsicHeight(); |