forked from google/android-fhir
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Per question custom style (google#2636)
* per question custom style * adding missing file. * update default style. * textAppearance support * rename custom attributes. * github documentation for custom style example. * Address review comments. * address review comment. * update text format icon as component icon. * code cleanup. * Code refactoring and cleanup. * custom style example with multiple question items. * Address review comments. * support prefix per question item custom style * Revert dataconfig changes for custom style mapping. * Address review comments. * Address review comments. * Address review comments. * Address review comments. * Address review comment. --------- Co-authored-by: Santosh Pingle <[email protected]>
- Loading branch information
1 parent
52c257e
commit c1e6a95
Showing
15 changed files
with
897 additions
and
3 deletions.
There are no files selected for viewing
149 changes: 149 additions & 0 deletions
149
catalog/src/main/assets/component_per_question_custom_style.json
This file contains 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,149 @@ | ||
{ | ||
"resourceType": "Questionnaire", | ||
"item": [ | ||
{ | ||
"linkId": "1", | ||
"text": "Custom style 1", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_1" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"linkId": "2", | ||
"text": "Custom style 2", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_2" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"linkId": "3", | ||
"text": "Custom style 3", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_3" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"linkId": "4", | ||
"text": "Custom style 4", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_4" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"linkId": "5", | ||
"text": "Custom style 5", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_5" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"linkId": "6", | ||
"text": "Custom style 6", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_6" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"linkId": "7", | ||
"text": "Custom style 7", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_7" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"linkId": "8", | ||
"text": "Custom style 8", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_8" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"linkId": "9", | ||
"text": "Custom style 9", | ||
"type": "display", | ||
"extension": [ | ||
{ | ||
"url": "https://github.com/google/android-fhir/tree/master/datacapture/android-style", | ||
"extension": [ | ||
{ | ||
"url": "question_text_view", | ||
"valueString": "CustomStyle_9" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains 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 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 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,15 @@ | ||
<vector | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:autoMirrored="true" | ||
android:height="64dp" | ||
android:viewportHeight="960" | ||
android:viewportWidth="960" | ||
android:width="64dp" | ||
> | ||
|
||
<path | ||
android:fillColor="#1A73E8" | ||
android:pathData="M200,760v-60h560v60L200,760ZM276,600 L451,160h58l175,440h-55l-45,-119L376,481l-45,119h-55ZM393,436h174l-85,-222h-4l-85,222Z" | ||
/> | ||
|
||
</vector> |
This file contains 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,36 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
Copyright 2020 Google LLC | ||
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 | ||
http://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. | ||
--> | ||
<resources> | ||
<color name="custom_style_primary_100">#000000</color> | ||
<color name="custom_style_primary_200">#0C0A20</color> | ||
<color name="custom_style_primary_300">#201441</color> | ||
<color name="custom_style_primary_400">#341F63</color> | ||
<color name="custom_style_primary_500">#482A85</color> | ||
<color name="custom_style_primary_600">#5C35A6</color> | ||
<color name="custom_style_primary_700">#7F5FBA</color> | ||
<color name="custom_style_primary_800">#A289CF</color> | ||
<color name="custom_style_primary_900">#C5B3E3</color> | ||
<color name="custom_style_on_primary_100">#FFFFFF</color> | ||
<color name="custom_style_on_primary_200">#FFFFFF</color> | ||
<color name="custom_style_on_primary_300">#FFFFFF</color> | ||
<color name="custom_style_on_primary_400">#FFFFFF</color> | ||
<color name="custom_style_on_primary_500">#FFFFFF</color> | ||
<color name="custom_style_on_primary_600">#FFFFFF</color> | ||
<color name="custom_style_on_primary_700">#FFFFFF</color> | ||
<color name="custom_style_on_primary_800">#000000</color> | ||
<color name="custom_style_on_primary_900">#000000</color> | ||
</resources> |
This file contains 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 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.