@onekeyfe/react-native-pager-view 3.0.148 → 3.0.151
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.
|
@@ -216,7 +216,13 @@ private class CollapsiblePagerHorizontalItemsView(
|
|
|
216
216
|
var x = contentPaddingPx
|
|
217
217
|
buttons.forEachIndexed { index, button ->
|
|
218
218
|
val textWidth = ceil(button.paint.measureText(button.text.toString()).toDouble()).toInt()
|
|
219
|
-
|
|
219
|
+
// Reuse the rounded padding: dp(16) can be one pixel less than two dp(8) insets.
|
|
220
|
+
val horizontalPadding = if (showsProgressIndicator) {
|
|
221
|
+
button.compoundPaddingLeft + button.compoundPaddingRight
|
|
222
|
+
} else {
|
|
223
|
+
dp(20.0)
|
|
224
|
+
}
|
|
225
|
+
val buttonWidth = max(dp(44.0), textWidth + horizontalPadding)
|
|
220
226
|
val indicatorWidth = textWidth
|
|
221
227
|
val indicatorX = x + (buttonWidth - indicatorWidth) / 2
|
|
222
228
|
itemFrames.add(intArrayOf(x, buttonWidth, indicatorX, indicatorWidth))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-pager-view",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.151",
|
|
4
4
|
"description": "React Native wrapper for Android and iOS ViewPager",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"typescript": "^5.9.2"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@onekeyfe/react-native-native-logger": "3.0.
|
|
69
|
+
"@onekeyfe/react-native-native-logger": "3.0.151",
|
|
70
70
|
"react": "*",
|
|
71
71
|
"react-native": "*"
|
|
72
72
|
},
|