Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflow-scripts/addDescriptiveLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const components = [
'NavigatorIOS',
'Picker',
'PickerIOS',
'ProgressBarAndroid',
'ProgressViewIOS',
'RefreshControl',
'SafeAreaView',
Expand Down
4 changes: 0 additions & 4 deletions packages/eslint-plugin-react-native/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ const publicAPIMapping = {
'PressableStateCallbackType',
],
},
'Libraries/Components/ProgressBarAndroid/ProgressBarAndroid': {
default: 'ProgressBarAndroid',
types: ['ProgressBarAndroidInstance', 'ProgressBarAndroidProps'],
},
'Libraries/Components/RefreshControl/RefreshControl': {
default: 'RefreshControl',
types: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ module.exports = new Set([
'KeyboardAvoidingView',
'Modal',
'Pressable',
'ProgressBarAndroid',
'ProgressViewIOS',
'SafeAreaView',
'ScrollView',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@ import type {ViewProps} from '../View/ViewPropTypes';
import StyleSheet, {type ColorValue} from '../../StyleSheet/StyleSheet';
import Platform from '../../Utilities/Platform';
import View from '../View/View';
import ActivityIndicatorViewNativeComponent from './ActivityIndicatorViewNativeComponent';
import * as React from 'react';

export type ActivityIndicatorInstance = HostInstance;

const PlatformActivityIndicator =
Platform.OS === 'android'
? require('../ProgressBarAndroid/ProgressBarAndroid').default
: require('./ActivityIndicatorViewNativeComponent').default;

const GRAY = '#999999';

type IndicatorSize = number | 'small' | 'large';
Expand Down Expand Up @@ -122,7 +118,7 @@ const ActivityIndicator: component(
...ActivityIndicatorProps,
}) => {
let sizeStyle;
let sizeProp;
let sizeProp: ?('small' | 'large');

switch (size) {
case 'small':
Expand All @@ -138,35 +134,19 @@ const ActivityIndicator: component(
break;
}

const nativeProps = {
animating,
color,
hidesWhenStopped,
...restProps,
ref: forwardedRef,
style: sizeStyle,
size: sizeProp,
};

const androidProps = {
styleAttr: 'Normal',
indeterminate: true,
};

return (
<View
onLayout={onLayout}
style={StyleSheet.compose(styles.container, style)}>
{Platform.OS === 'android' ? (
// $FlowFixMe[prop-missing] Flow doesn't know when this is the android component
// $FlowFixMe[incompatible-type]
<PlatformActivityIndicator {...nativeProps} {...androidProps} />
) : (
/* $FlowFixMe[incompatible-type] (>=0.106.0 site=react_native_android_fb) This comment
* suppresses an error found when Flow v0.106 was deployed. To see the
* error, delete this comment and run Flow. */
<PlatformActivityIndicator {...nativeProps} />
)}
<ActivityIndicatorViewNativeComponent
animating={animating}
color={color}
hidesWhenStopped={hidesWhenStopped}
{...restProps}
ref={forwardedRef}
style={sizeStyle}
size={sizeProp}
/>
</View>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ function renderSizeOutput(element: React.MixedElement): React.Node {
describe('ActivityIndicator', () => {
it('renders the default (small) size', () => {
expect(renderSizeOutput(<ActivityIndicator />)).toEqual(
<rn-androidProgressBar width="20" height="20" />,
<rn-activityIndicatorView width="20" height="20" />,
);
});

it('renders the large size', () => {
expect(renderSizeOutput(<ActivityIndicator size="large" />)).toEqual(
<rn-androidProgressBar width="36" height="36" />,
<rn-activityIndicatorView width="36" height="36" />,
);
});

it('renders a numeric size as an explicit width/height', () => {
expect(renderSizeOutput(<ActivityIndicator size={42} />)).toEqual(
<rn-androidProgressBar width="42" height="42" />,
<rn-activityIndicatorView width="42" height="42" />,
);
});

Expand All @@ -53,6 +53,6 @@ describe('ActivityIndicator', () => {
hidesWhenStopped={false}
/>,
),
).toEqual(<rn-androidProgressBar width="20" height="20" />);
).toEqual(<rn-activityIndicatorView width="20" height="20" />);
});
});

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -5040,21 +5040,6 @@ public abstract interface class com/facebook/react/viewmanagers/AndroidHorizonta
public abstract fun setRemoveClippedSubviews (Landroid/view/View;Z)V
}

public class com/facebook/react/viewmanagers/AndroidProgressBarManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManager;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/AndroidProgressBarManagerInterface : com/facebook/react/uimanager/ViewManagerWithGeneratedInterface {
public abstract fun setAnimating (Landroid/view/View;Z)V
public abstract fun setColor (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setIndeterminate (Landroid/view/View;Z)V
public abstract fun setProgress (Landroid/view/View;D)V
public abstract fun setStyleAttr (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setTestID (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setTypeAttr (Landroid/view/View;Ljava/lang/String;)V
}

public class com/facebook/react/viewmanagers/AndroidSwipeRefreshLayoutManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManager;)V
public fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
Expand Down
Loading
Loading