You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-source/src/en/about/changelog.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@
4
4
5
5
::: danger
6
6
7
-
We will only maintain the latest API version, if you are using an outdate API version, you voluntarily renounce any possibility of maintenance.
7
+
We will only maintain the latest API version. If you are using an outdated API version, you voluntarily renounce any possibility of maintenance.
8
8
9
9
:::
10
10
11
11
::: warning
12
12
13
-
To avoid translation time consumption, Changelog will use **Google Translation** from **Chinese** to **English**, please refer to the original text for actual reference.
13
+
To avoid translation time consumption, the Changelog will use **Google Translation** from **Chinese** to **English**. Please refer to the original text for actual reference.
Copy file name to clipboardExpand all lines: docs-source/src/en/guide/home.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Introduce
1
+
# Introduction
2
2
3
3
> `PanguText` is a solution for CJK (Chinese, Japanese, Korean) and English word, half-width number spacing.
4
4
@@ -13,7 +13,7 @@ Currently, the known vendor solutions are as follows:
13
13
- Xiaomi’s (HyperOS) text typography optimization
14
14
- OrginOS’s font-based text typography optimization
15
15
16
-
However, these solutions are closed and cannot be implemented on other platforms.
16
+
However, these solutions are closed-source and cannot be implemented on other platforms.
17
17
We aim to provide an open-source solution adaptable to various scenarios, featuring low intrusiveness and easy integration, allowing more developers to effectively address text typography issues.
18
18
19
19
The primary inspiration for this project comes from [pangu.js](https://github.com/vinta/pangu.js), which offers a set of regular expressions for CJK typography.
@@ -66,5 +66,5 @@ The maintenance of this project is inseparable from the support and contribution
66
66
67
67
This project is currently in its early stages, and there may still be some problems or lack of functions you need.
68
68
69
-
If possible, feel free to submit a PR to contribute features you think are needed to this project or goto[GitHub Issues](repo://issues)
69
+
If possible, feel free to submit a PR to contribute features you think are needed to this project or go to[GitHub Issues](repo://issues)
Copy file name to clipboardExpand all lines: docs-source/src/en/library/android.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ Integrating `PanguText` into your current project is very easy. You don't need t
93
93
94
94
#### Inject to LayoutInflater
95
95
96
-
`PanguText`supports direct injection of `LayoutInflater.Factory2` or creating a `LayoutInflater.Factory2` instance for the current `Activity` to take over the entire view. This is the recommended integration method, as it allows for non-intrusive and quick integration without modifying any existing layouts.
96
+
`PanguText`supports direct injection of `LayoutInflater.Factory2` or creating a `LayoutInflater.Factory2` instance for the current `Activity` to take over the entire view layout inflation. This is the recommended integration method, as it allows for non-intrusive and quick integration without modifying any existing layouts.
97
97
98
98
> The following example
99
99
@@ -113,7 +113,7 @@ class MainActivity : AppCompatActivity() {
113
113
114
114
::: tip
115
115
116
-
Since `LayoutInflater.Factory2` is taken over, recycled layouts like `ListView` and `RecyclerView` can also be correctly taken over.
116
+
Since `LayoutInflater.Factory2` is taken over, recycled layouts like `ListView` and `RecyclerView` can also be correctly handled.
117
117
118
118
After injecting the `LayoutInflater` instance in the `Activity`, the following instances attached to the current `Context` will automatically take effect:
119
119
@@ -122,7 +122,7 @@ After injecting the `LayoutInflater` instance in the `Activity`, the following i
122
122
- `PopupWindow`
123
123
- `Toast`(foreground only in higher system versions)
124
124
125
-
Layouts based on `RemoteView` will not take effect because they are remote objects and do not use the current `Context`'s `LayoutInflater` for layout loading.
125
+
Layouts based on `RemoteView` will not take effect because they are remote objects and do not use the current `Context`'s `LayoutInflater` for layout inflation.
126
126
127
127
:::
128
128
@@ -166,15 +166,15 @@ class MainActivity : Activity() {
166
166
::: tip
167
167
168
168
`PanguTextFactory2`can be used not only with `Activity` but also injected into any existing `LayoutInflater` instance.
169
-
However, please inject before the `LayoutInflater` instance is used to load the layout, otherwise it will not take effect.
169
+
However, please inject it before the `LayoutInflater` instance is used to inflate the layout, otherwise it will not take effect.
170
170
171
171
:::
172
172
173
173
#### Using the Patching Tool
174
174
175
175
You can use `PanguTextPatcher` to patch existing `View` or `ViewGroup` instances.
176
176
177
-
Patch the entire root layout, and `PanguTextPatcher` will automatically patch all `TextView` or its subclasses under the root layout.
177
+
Patch the entire root layout, and `PanguTextPatcher` will automatically patch all `TextView` instances or their subclasses under the root layout.
178
178
179
179
> The following example
180
180
@@ -326,19 +326,19 @@ config.isEnabled = true
326
326
// If issues occur, you can disable it. When disabled, Spanned text will return the original text.
327
327
config.isProcessedSpanned = true
328
328
// Whether to automatically re-measure the text width after processing.
329
-
// Note: [PanguText] after injecting text and changing the text,
329
+
// Note: After [PanguText] injects text and changes the text,
330
330
// the width of [TextView] will not be calculated automatically.
331
331
// At this time, this feature will call [TextView.setText] to re-execute the measurements,
332
-
// which can fix every time in some dynamic layouts (such as `RecyclerView`) changes in text width,
333
-
// but may cause performance issues, you can choose to disable this feature.
332
+
// which can fix issues in some dynamic layouts (such as `RecyclerView`) where text width changes each time,
333
+
// but may cause performance issues. You can choose to disable this feature.
334
334
// To prevent unnecessary performance overhead,
335
335
// this feature only takes effect on [TextView] with `maxLines` set to 1 or `singleLine`.
336
336
config.isAutoRemeasureText = true
337
337
// Set patterns to exclude during formatting using regular expressions.
0 commit comments