mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Added typed information for lazily loaded android types.
This commit is contained in:
@@ -15,7 +15,7 @@ function ensureFloatType() {
|
||||
}
|
||||
}
|
||||
|
||||
var argbEvaluator;
|
||||
var argbEvaluator: android.animation.ArgbEvaluator;
|
||||
function ensureArgbEvaluator() {
|
||||
if (!argbEvaluator) {
|
||||
argbEvaluator = new android.animation.ArgbEvaluator();
|
||||
|
||||
@@ -30,7 +30,7 @@ function ensureLruBitmapCacheClass() {
|
||||
|
||||
export class Cache extends common.Cache {
|
||||
private _callback: any;
|
||||
private _cache;
|
||||
private _cache: android.util.LruCache<string, android.graphics.Bitmap>;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@@ -38,7 +38,6 @@ export class Cache extends common.Cache {
|
||||
ensureLruBitmapCacheClass();
|
||||
var maxMemory = java.lang.Runtime.getRuntime().maxMemory() / 1024;
|
||||
var cacheSize = maxMemory / 8;
|
||||
//console.log("cacheSize: " + cacheSize);
|
||||
this._cache = new LruBitmapCacheClass(cacheSize);
|
||||
|
||||
var that = new WeakRef(this);
|
||||
|
||||
@@ -123,7 +123,7 @@ export class Page extends pageCommon.Page {
|
||||
}
|
||||
|
||||
/* tslint:disable */
|
||||
private _dialogFragment;
|
||||
private _dialogFragment: android.app.DialogFragment;
|
||||
/* tslint:enable */
|
||||
protected _showNativeModalView(parent: Page, context: any, closeCallback: Function, fullscreen?: boolean) {
|
||||
super._showNativeModalView(parent, context, closeCallback, fullscreen);
|
||||
|
||||
@@ -88,7 +88,7 @@ function onItemsPropertyChanged(data: dependencyObservable.PropertyChangeData) {
|
||||
|
||||
var arr = java.lang.reflect.Array.newInstance(java.lang.Integer.class.getField("TYPE").get(null), 1);
|
||||
arr[0] = R_ATTR_STATE_SELECTED;
|
||||
var colorDrawable = new SegmentedBarColorDrawableClass(view.selectedBackgroundColor.android)
|
||||
var colorDrawable: android.graphics.drawable.ColorDrawable = new SegmentedBarColorDrawableClass(view.selectedBackgroundColor.android)
|
||||
stateDrawable.addState(arr, colorDrawable);
|
||||
stateDrawable.setBounds(0, 15, vg.getRight(), vg.getBottom());
|
||||
|
||||
@@ -128,6 +128,8 @@ function ensureSegmentedBarColorDrawableClass() {
|
||||
canvas.drawRect(0, this.getBounds().height() - 15, this.getBounds().width(), this.getBounds().height(), p);
|
||||
}
|
||||
}
|
||||
|
||||
SegmentedBarColorDrawableClass = SegmentedBarColorDrawable;
|
||||
}
|
||||
|
||||
export class SegmentedBarItem extends common.SegmentedBarItem {
|
||||
@@ -144,7 +146,7 @@ export class SegmentedBarItem extends common.SegmentedBarItem {
|
||||
}
|
||||
|
||||
export class SegmentedBar extends common.SegmentedBar {
|
||||
private _android;
|
||||
private _android: android.widget.TabHost;
|
||||
public _listener: android.widget.TabHost.OnTabChangeListener;
|
||||
|
||||
public _createUI() {
|
||||
|
||||
@@ -186,7 +186,7 @@ export class TabView extends common.TabView {
|
||||
private _pagerAdapter: android.support.v4.view.PagerAdapter;
|
||||
private _androidViewId: number;
|
||||
|
||||
private _pageChagedListener;
|
||||
private _pageChagedListener: android.support.v4.view.ViewPager.SimpleOnPageChangeListener;
|
||||
|
||||
get android(): android.view.View {
|
||||
return this._grid;
|
||||
|
||||
Reference in New Issue
Block a user