mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
fix(android): autofillType on apiLevel < 26
This commit is contained in:
@ -15,7 +15,7 @@ export interface ComponentModule {
|
|||||||
exports: any;
|
exports: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
const legacyShortBarrels = [
|
const legacyShortBarrels = __UI_USE_EXTERNAL_RENDERER__?[]:[
|
||||||
'text/formatted-string',
|
'text/formatted-string',
|
||||||
'text/span',
|
'text/span',
|
||||||
'ui/text-base/formatted-string',
|
'ui/text-base/formatted-string',
|
||||||
|
@ -143,8 +143,6 @@ function initializeEditTextListeners(): void {
|
|||||||
EditTextListeners = EditTextListenersImpl;
|
EditTextListeners = EditTextListenersImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
let apiLevel: number;
|
|
||||||
|
|
||||||
export abstract class EditableTextBase extends EditableTextBaseCommon {
|
export abstract class EditableTextBase extends EditableTextBaseCommon {
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
_dirtyTextAccumulator: string;
|
_dirtyTextAccumulator: string;
|
||||||
@ -164,9 +162,6 @@ export abstract class EditableTextBase extends EditableTextBaseCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public createNativeView() {
|
public createNativeView() {
|
||||||
if (!apiLevel) {
|
|
||||||
apiLevel = sdkVersion();
|
|
||||||
}
|
|
||||||
return new android.widget.EditText(this._context);
|
return new android.widget.EditText(this._context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,7 +303,7 @@ export abstract class EditableTextBase extends EditableTextBaseCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[autofillTypeProperty.setNative](value: CoreTypes.AutofillType) {
|
[autofillTypeProperty.setNative](value: CoreTypes.AutofillType) {
|
||||||
if (apiLevel < 26) {
|
if (sdkVersion() < 26) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let newOptions;
|
let newOptions;
|
||||||
|
Reference in New Issue
Block a user