-
Notifications
You must be signed in to change notification settings - Fork 264
Add a new screen for customizing the export #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
f6e15d0
Initial CustomizeExportScreen.kt
riggaroo f85b5ef
Add GenericTool and Tool options for ratio and background.
riggaroo 90c4a86
Add GenericTool and Tool options for ratio and background.
riggaroo 01bca3a
Setup Background tool and Aspect ratio tools to render correctly.
riggaroo 5f08b44
Spotless
riggaroo 8851abe
Large screen layout optimizations
riggaroo 095cd85
Large screen layout optimizations
riggaroo 9cd777d
Large screen layout optimizations
riggaroo e601d21
Basic offscreen rendering implementation.
riggaroo 3f44474
Basic offscreen rendering implementation.
riggaroo 54eeacc
Fix KSP warning
riggaroo 95171db
Clean up aspect ratio code, dont make it smaller and smaller in size.
riggaroo 80e0c6d
Remove custom aspect ratio and create option for now
riggaroo 79d667d
Add background presets
riggaroo 6da4679
More background tweaks to fit the content in the correct area.
riggaroo 2b416ae
Fixing up the backgrounds and export image size to match the aspect R…
riggaroo c7cc647
Merge branch 'main' into feature/customize-export
riggaroo e624ea7
Code review comments
riggaroo a188f34
Code review comments
riggaroo 1b8f218
Build fixes
riggaroo 02fb993
Build fixes
riggaroo 15f2177
Redo logic around sizing and positioning of droid on top of content t…
riggaroo 4375b10
Spotless
riggaroo 2a68733
Logic fixes for keeping the selected background option when moving in…
riggaroo 2da9f95
Merge branch 'main' into feature/customize-export
riggaroo f884baf
spotless
riggaroo ff22caa
Create FakeComposableBitmapRenderer.kt and fix CustomizeExportViewMod…
riggaroo 620b43d
Remove snapshot dependencies
riggaroo 02f752b
Add a "plain" option for exporting images
riggaroo 308a759
Lint debug
riggaroo cea9ee0
Added CustomizeStateTest.kt
riggaroo 9a363a9
[WIP] add animateBounds on CustomizeExportScreen.kt
riggaroo 8367bd2
[WIP] add animateBounds on CustomizeExportScreen.kt
riggaroo 9706213
[WIP] add animateBounds on CustomizeExportScreen.kt
riggaroo b21b17c
Spotless
riggaroo 0c67e2d
Fixed up ratio change animations.
riggaroo f629ffe
Spotless
riggaroo 63e9558
CustomizeExportScreen.kt properly support large screen with weights
riggaroo ba7612f
CustomizeExportScreen.kt properly support large screen with weights
riggaroo 4184076
CustomizeExportScreen.kt properly support large screen with weights
riggaroo ba74146
Merge branch 'feature/customize-export' of https://github.com/android…
riggaroo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
203 changes: 148 additions & 55 deletions
203
core/network/src/main/res/xml/remote_config_defaults.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...testing/src/main/java/com/android/developers/testing/util/FakeComposableBitmapRenderer.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* | ||
| * Copyright 2025 The Android Open Source Project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package com.android.developers.testing.util | ||
|
|
||
| import android.graphics.Bitmap | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.geometry.Size | ||
| import androidx.core.graphics.createBitmap | ||
| import com.android.developers.androidify.customize.ComposableBitmapRenderer | ||
|
|
||
| class FakeComposableBitmapRenderer : ComposableBitmapRenderer { | ||
| override fun initialize() { | ||
| } | ||
|
|
||
| override fun dispose() { | ||
| } | ||
|
|
||
| override suspend fun renderComposableToBitmap( | ||
| canvasSize: Size, | ||
| composableContent: @Composable (() -> Unit), | ||
| ): Bitmap? { | ||
| return createBitmap(1, 1) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- | ||
| Copyright 2025 The Android Open Source Project | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| https://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| --> | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="24dp" | ||
| android:height="24dp" | ||
| android:tint="#000000" | ||
| android:viewportWidth="960" | ||
| android:viewportHeight="960"> | ||
|
|
||
| <path | ||
| android:fillColor="@android:color/white" | ||
| android:pathData="M680,880Q630,880 595,845Q560,810 560,760Q560,754 563,732L282,568Q266,583 245,591.5Q224,600 200,600Q150,600 115,565Q80,530 80,480Q80,430 115,395Q150,360 200,360Q224,360 245,368.5Q266,377 282,392L563,228Q561,221 560.5,214.5Q560,208 560,200Q560,150 595,115Q630,80 680,80Q730,80 765,115Q800,150 800,200Q800,250 765,285Q730,320 680,320Q656,320 635,311.5Q614,303 598,288L317,452Q319,459 319.5,465.5Q320,472 320,480Q320,488 319.5,494.5Q319,501 317,508L598,672Q614,657 635,648.5Q656,640 680,640Q730,640 765,675Q800,710 800,760Q800,810 765,845Q730,880 680,880ZM680,800Q697,800 708.5,788.5Q720,777 720,760Q720,743 708.5,731.5Q697,720 680,720Q663,720 651.5,731.5Q640,743 640,760Q640,777 651.5,788.5Q663,800 680,800ZM200,520Q217,520 228.5,508.5Q240,497 240,480Q240,463 228.5,451.5Q217,440 200,440Q183,440 171.5,451.5Q160,463 160,480Q160,497 171.5,508.5Q183,520 200,520ZM680,240Q697,240 708.5,228.5Q720,217 720,200Q720,183 708.5,171.5Q697,160 680,160Q663,160 651.5,171.5Q640,183 640,200Q640,217 651.5,228.5Q663,240 680,240ZM680,760Q680,760 680,760Q680,760 680,760Q680,760 680,760Q680,760 680,760Q680,760 680,760Q680,760 680,760Q680,760 680,760Q680,760 680,760ZM200,480Q200,480 200,480Q200,480 200,480Q200,480 200,480Q200,480 200,480Q200,480 200,480Q200,480 200,480Q200,480 200,480Q200,480 200,480ZM680,200Q680,200 680,200Q680,200 680,200Q680,200 680,200Q680,200 680,200Q680,200 680,200Q680,200 680,200Q680,200 680,200Q680,200 680,200Z" /> | ||
|
|
||
| </vector> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 15 additions & 1 deletion
16
core/util/src/main/java/com/android/developers/androidify/util/LocalOcclusion.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,21 @@ | ||
| /* | ||
| * Copyright 2025 The Android Open Source Project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package com.android.developers.androidify.util | ||
|
|
||
| import androidx.compose.runtime.compositionLocalOf | ||
| import androidx.compose.runtime.mutableStateOf | ||
|
|
||
| val LocalOcclusion = compositionLocalOf { mutableStateOf(false) } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.