@nativescript-community/ui-material-activityindicator 7.2.36 → 7.2.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,5 @@
1
1
  import { ActivityIndicatorBase } from './index-common';
2
2
  export declare class ActivityIndicator extends ActivityIndicatorBase {
3
+ nativeViewProtected: com.google.android.material.progressindicator.CircularProgressIndicator;
4
+ createNativeView(): com.google.android.material.progressindicator.CircularProgressIndicator;
3
5
  }
package/index.android.js CHANGED
@@ -1,12 +1,19 @@
1
1
  import { ActivityIndicatorBase, indeterminateProperty, maxValueProperty, valueProperty } from './index-common';
2
+ import { inflateLayout } from '@nativescript-community/ui-material-core/android/utils';
2
3
  export class ActivityIndicator extends ActivityIndicatorBase {
3
- // nativeViewProtected: com.google.android.material.progressindicator.CircularProgressIndicator;
4
4
  // createNativeView() {
5
5
  // const progressBar = new com.google.android.material.progressindicator.CircularProgressIndicator(this._context);
6
6
  // progressBar.setVisibility(android.view.View.INVISIBLE);
7
7
  // progressBar.setIndeterminate(true);
8
8
  // return progressBar;
9
9
  // }
10
+ // TODO: we are not using com.google.android.material.progressindicator.CircularProgressIndicator
11
+ // cause it does not measure as it did before
12
+ // could be solved by subclass which would override onMeasure and try to do it again
13
+ // like this https://github.com/aosp-mirror/platform_frameworks_base/blob/77ff5996acbe3cd2fde0f9eb559d3e77c3b48e3e/core/java/android/widget/ProgressBar.java#L2187
14
+ createNativeView() {
15
+ return inflateLayout(this._context, 'ns_material_circular_progress');
16
+ }
10
17
  [valueProperty.getDefault]() {
11
18
  return 0;
12
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.android.js","sourceRoot":"../src/","sources":["index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/G,MAAM,OAAO,iBAAkB,SAAQ,qBAAqB;IACxD,gGAAgG;IA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ACnC,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,CAAC,gBAAgB,CAAC,UAAU,CAAC;QACzB,OAAO,GAAG,CAAC;IACf,CAAC;IACD,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,KAAa;QACtC,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,KAAc;QAC5C,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-material-activityindicator",
3
- "version": "7.2.36",
3
+ "version": "7.2.40",
4
4
  "description": "Material Design Activity Indicator expresses an unspecified wait time.",
5
5
  "main": "./index",
6
6
  "sideEffects": false,
@@ -47,7 +47,7 @@
47
47
  "readmeFilename": "README.md",
48
48
  "homepage": "https://nativescript-community.github.io/ui-material-components/modules/_nativescript_community_ui_material_activityindicator.html",
49
49
  "dependencies": {
50
- "@nativescript-community/ui-material-core": "^7.2.36"
50
+ "@nativescript-community/ui-material-core": "^7.2.40"
51
51
  },
52
- "gitHead": "698c3d07621ce5faed66ed39a13bd69ae8cf32e2"
52
+ "gitHead": "3ce346105a6349a82871968f997884029534c436"
53
53
  }
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <android.widget.ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
3
+ style="?android:attr/progressBarStyle"
4
+ android:layout_width="wrap_content"
5
+ android:layout_height="wrap_content"
6
+ android:visibility="invisible"
7
+ android:indeterminate="true">
8
+ </android.widget.ProgressBar>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources
3
+ xmlns:android="http://schemas.android.com/apk/res/android">
4
+ <style name="CircularProgress" parent="@android:style/Widget.Material.ProgressBar">
5
+ </style>
6
+ </resources>