Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
4e42af8
Add comment about Text autosizing
noties Feb 1, 2024
b5994f2
Add various builders
noties Feb 26, 2024
c86b3c4
Small fixes
noties Feb 26, 2024
b2a55e9
Colors, change to operator get
noties Feb 26, 2024
c4fbd4a
Update provider authority
noties Feb 27, 2024
e767017
Working with explore modal layout
noties Mar 15, 2024
d52b763
Fix compilation and tests
noties Mar 31, 2024
5b93416
Process value=rawValue
noties Apr 1, 2024
de669b7
Add some builder values
noties Jun 5, 2024
d3095e7
Update flex to use builders
noties Jun 5, 2024
78732fd
Working with view state
noties Oct 21, 2024
3a3e4cb
Update README
noties Oct 21, 2024
96e5d60
Readme change
noties Oct 21, 2024
e59c69e
Another readme change
noties Oct 22, 2024
d318b69
hm
noties Oct 22, 2024
bf6068f
Html vs markdown
noties Oct 22, 2024
af9b4c4
Working with grid
noties Oct 25, 2024
168b18f
wip
noties Oct 25, 2024
9215ebc
Working with grid
noties Nov 1, 2024
dec36db
Working with grid
noties Nov 4, 2024
b340643
Working with overlay api
noties Nov 6, 2024
472b08f
grid alphabet
noties Nov 8, 2024
ba61742
Working with sample
noties Nov 23, 2024
620981c
update dependencies versions
noties Nov 24, 2024
1d7ea6e
Screenshot tests for samples
noties Nov 24, 2024
01bd7bc
sample update view-factory constants usage
noties Nov 25, 2024
55f05fb
removing deprectations, preAttach in viewElement
noties Nov 27, 2024
2070fdb
factory changes
noties Nov 28, 2024
4b46b4f
item type factory
noties Nov 29, 2024
f2a2f6d
ui, window insets
noties Dec 3, 2024
14edab9
feat: adapt items change listener
noties Dec 8, 2024
7d7ab20
fix: test
noties Dec 8, 2024
d2661ce
sample update screenshot
noties Dec 8, 2024
7369e74
fix lint
noties Dec 8, 2024
33ecee4
commit
noties Dec 10, 2024
6e9e6c3
5.3-snapshot
noties Dec 13, 2024
c7a53bd
grid
noties Sep 27, 2025
2c1aa1a
feat: shape-drawable stateful update
noties Jan 4, 2026
133ca30
feat: shape-drawable staeful test
noties Jan 4, 2026
25be4e8
test: shape-drawable stateful integration
noties Jan 4, 2026
00a083f
feat: version catalog
noties Jan 4, 2026
4b83dd0
fix: test
noties Jan 4, 2026
333116e
update showcase
noties Jan 4, 2026
0a8db48
feat: remove deprecations
noties Jan 4, 2026
6d4aaa0
feat: change artifact group and version
noties Jan 4, 2026
db33373
feat: publish to maven central
noties Jan 4, 2026
bc0a28e
feat: update paparazzi snapshots
noties Jan 4, 2026
969f665
feat: started new sample processor
noties Jan 4, 2026
aaf4c34
processor2
noties Jan 5, 2026
9e5524d
samples
noties Jan 5, 2026
0bfa314
working with samples
noties Jan 5, 2026
9a9f31a
remove deprecations
noties Jan 6, 2026
7a12b2d
prepare the release
noties Jan 11, 2026
c6f6cb7
release
noties Jan 11, 2026
c39da52
update sample script invocation
noties Jan 12, 2026
d71b5dc
again
noties Jan 12, 2026
3105a72
jvm version 17
noties Jan 12, 2026
f7e178c
fix lint
noties Jan 12, 2026
445d037
misc: update assets directory
noties Mar 22, 2026
5762245
add bom mobule
noties Mar 22, 2026
84fdd64
misc: update README
noties Mar 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/snapshots/**/*.png filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Build with Gradle
run: ./gradlew check --stacktrace
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Build with Gradle
run: ./gradlew check --stacktrace
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
**/build
/captures
.externalNativeBuild

/.maven
17 changes: 13 additions & 4 deletions .run/sample.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="--es aid &quot;20230715105856&quot;" />
<option name="ACTIVITY_EXTRA_FLAGS" value="--es aid &quot;20241211001529&quot;" />
<option name="MODE" value="default_activity" />
<option name="RESTORE_ENABLED" value="false" />
<option name="RESTORE_FILE" value="" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
Expand All @@ -25,21 +26,30 @@
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
<option name="DEBUG_SANDBOX_SDK" value="false" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
<option name="DEBUG_SANDBOX_SDK" value="false" />
</Hybrid>
<Java />
<Java>
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
<option name="DEBUG_SANDBOX_SDK" value="false" />
</Java>
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
<option name="DEBUG_SANDBOX_SDK" value="false" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
Expand All @@ -48,7 +58,6 @@
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Callstack Sample" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
<option name="PROFILING_MODE" value="NOT_SET" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY_CLASS" value="" />
Expand Down
128 changes: 128 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,133 @@
# Changelog

# 5.1
### Added
* new \[`adapt-kt`] kotlin module (includes `AdaptGetter`, sample:`AdaptGetterSample`)
* \[`adapt-ui`] `App`, `Colors`, `Dimens`, `Strings`, `ViewStyles`, `TextSizes`, `TextStyles`
* \[`adapt-ui`] `ViewElement.backgroundColor`, `ViewElement.backgroundGradient`, `ViewElement.foregroundColor` builders:
```kotlin
Text()
.backgroundColor { primary }
.backgroundGradient {
linear {
edges { top to bottom }
.setColors(orange, primary, accent)
}
}
.foregroundColor { accent }
```
* \[`adapt-ui`] `ViewElement.elevation`:
```kotlin
Text().elevation { barElevation }
```
* \[`adapt-ui`] `ViewElement.overScrollMode`:
```kotlin
Text()
.overScrollMode { ifContentScrolls }
```
* \[`adapt-ui`] `ViewElement.scrollBarStyle`:
```kotlin
Text().scrollBarStyle { outsideOverlay }
```
* \[`adapt-ui`] `ViewElement.scrollBarsEnabled`
* \[`adapt-ui`] `ViewElement.requestFocus`
* \[`adapt-ui`] accessibility:
```kotlin
Text()
.accessibilityImportant { yes }
.accessibilityLiveRegion { polite }
```
* \[`adapt-ui`] `Image.imageScaleType`, `Image.imageTint`:
```kotlin
Image()
.imageScaleType { fitCenter }
.imageTint { accent }
```
* \[`adapt-ui`] `stackGravity` for `HStack`, `VStack`:
```kotlin
VStack {}.stackGravity { center.horizontal }
HStack {}.stackGravity { top.leading }
```
* \[`adapt-ui`] `Text`:
```kotlin
Text()
.textEllipsize { end }
.textHyphenationFrequency { normal }
.textBreakStrategy { simple }
.textJustificationMode { interWord }
.textInputType { text.capWords }
.textImeOptions { noFullScreen.noExtractUi.actionUnspecified }
```
* \[`adapt-ui`] `ViewElement.onViewStateChange`:
```kotlin
Text()
.onViewStateChange { view, viewState ->
val y = if (viewState.isPressed) -2 else 0
view.translationY = y.dip.toFloat()
}
```
* \[`adapt-ui`] `VStackContentMeasuredLast` element and `LinearLayoutContentMeasuredLast` widget
* \[`adapt-ui`] `VStackReverseDrawingOrder` element and `LinearLayoutReverseDrawingOrder` widget
* \[`adapt-ui`] `ZStackSquare` element and `SquareFrameLayout` widget
* \[`adapt-ui`] `ZStackWrapHeightOrScroll` element and `FrameLayoutWrapHeightOrScroll` widget
* \[`adapt-ui`] `Grid` element and `GridLayout` widget
* \[`adapt-ui`] `Web` element to build `WebView`
* \[`adapt-ui`] `ElementItem.onRefReady`
* \[`adapt-ui`] `PreviewViewCustomization` to customize how view is drawn in layout-preview pane
* \[`adapt-ui`] `ColorStateListFactory`, `DrawableStateListFactory`, `ShapeStateListFactory` along with state builders:
```kotlin
Text()
.backgroundWithState {
activated = Rectangle()
default = Circle()
}
.backgroundColorWithState {
activated.enabled = accent
default = black
}
// in similar way:
.foregroundWithState {}
.foregroundColorWithState {}
// Text
.textColorWithState {}

Image()
.imageTintWithState {}
```
* \[`adapt-ui`] `ViewState` to replace `DrawableState`, unified semantics for color, drawable, shape builder with state
* \[`adapt-ui`] `PorterDuffModeFactory` to create `PorterDuff.Mode`
* \[`adapt-ui-flex`] - element configurations:
```kotlin
Flex {
View()
.layoutFlexAlignSelf { stretch }
}.indent()
.flexDirection { row }
.flexWrap { wrap }
.flexJustifyContent { center }
.flexAlignItems { center }
.flexAlignContent { center }
```

### Changed
* `AdaptViewGroup`, if configured `Adapt` is empty then supporting `viewGroup`
visibility will be set to `View.GONE` automatically. Configure `AdaptViewGroup.Configuration`
with `hideIfEmpty(false)` to disable
* `ViewGroup.addOnHierarchyChangeListener` utility to register multiple `OnHierarchyChangeListener`
* `View.addOnFocusChangedListener` utility to register multiple `OnFocusChangedListener`
* `ViewFlag` utility
* \[`adapt-ui-flex`] `Flex`element is using `wrap` for flex-wrap by default

### Deprecated
* \[`adapt-ui`] `ViewFactoryConstants` `FILL` and `WRAP` to lowercase: `fill` and `wrap`:
```kotlin
Text().layout(fill, wrap)
```
* `DrawableState` is deprecated in favor of `ViewState`
* `io.noties.adapt.ui.util.ColorStateListBuilder` is deprecated in favor of `io.noties.adapt.ui.state.ColorStateListFactory`
* \[`adapt-ui`] `ViewElement.background(color: Int)` in favor of `ViewElement.backgroundColor(color: Int)`


# 5.0.0
### Changed
* `Text`: `.textFont` => `.textTypeface`
Expand Down
2 changes: 1 addition & 1 deletion LIVE_TEMPLATES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class $SAMPLE_NAME$: io.noties.adapt.sample.samples.adaptui.AdaptUISampleView()
}
}

@io.noties.adapt.sample.util.Preview
@io.noties.adapt.preview.Preview
@Suppress("ClassName", "unused")
private class Preview__$SAMPLE_NAME$(
context: android.content.Context,
Expand Down
Loading
Loading