Skip to content

Commit

Permalink
Reskinning demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
MJ1998 committed Oct 9, 2023
1 parent ddb2a7f commit bfe1f20
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 26 deletions.
7 changes: 3 additions & 4 deletions demo/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay"
>
android:theme="@style/AppTheme.Toolbar">

<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:titleCentered="true"
/>

</com.google.android.material.appbar.AppBarLayout>
Expand Down
1 change: 0 additions & 1 deletion demo/src/main/res/layout/patient_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_margin="@dimen/fab_margin"
android:scrollbars="vertical"
/>
</FrameLayout>
13 changes: 6 additions & 7 deletions demo/src/main/res/layout/patient_details_header.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<FrameLayout
xmlns:tools="http://schemas.android.com/tools"
<FrameLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="1dp"
>
xmlns:app="http://schemas.android.com/apk/res-auto"
android:padding="1dp">
<LinearLayout
android:id="@+id/patient_container"
android:layout_width="match_parent"
Expand Down Expand Up @@ -41,6 +40,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:includeFontPadding="false"
android:text=""
/>
</LinearLayout>
Expand Down Expand Up @@ -70,11 +70,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:paddingStart="2dp"
android:drawablePadding="2dp"
android:drawableStart="@drawable/ic_baseline_add_24"
android:paddingHorizontal="12dp"
android:text="@string/complete_survey"
android:textAppearance="?attr/textAppearanceBody2"
app:cornerRadius="@android:dimen/app_icon_size"
/>
</LinearLayout>
</FrameLayout>
2 changes: 1 addition & 1 deletion demo/src/main/res/layout/patient_list_item_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:paddingVertical="@dimen/fab_margin"
Expand Down
11 changes: 5 additions & 6 deletions demo/src/main/res/layout/patient_list_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<RelativeLayout
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>

<TextView
android:id="@+id/patient_count"
android:text="0 Patients"
android:layout_centerHorizontal="true"
android:textAppearance="?attr/textAppearanceSearchResultSubtitle"
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
Expand All @@ -36,11 +38,8 @@
android:name="com.google.fhirengine.example.PatientListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:scrollbars="vertical"
app:layoutManager="LinearLayoutManager"
tools:context=".PatientListActivity"
tools:listitem="@layout/patient_list_item_view"
/>
</RelativeLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
1 change: 0 additions & 1 deletion demo/src/main/res/layout/sync_status_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
android:id="@+id/linearLayoutSyncStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/text_margin"
android:layout_marginBottom="@dimen/text_margin"
android:clickable="true"
android:gravity="center"
Expand Down
5 changes: 2 additions & 3 deletions demo/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@
<color name="colorPrimary">#175adf</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#175adf</color>
<color name="colorStatusBar">#175adf</color>
<color name="colorStatusBar">#ffffffff</color>
<color name="low_risk">#388e3c</color>
<color name="low_risk_background">#e8f5e9</color>
<color name="moderate_risk">#FFBF00</color>
<color name="moderate_risk_background">#fff8e1</color>
<color name="high_risk">#c62828</color>
<color name="high_risk_background">#ffebee</color>
<color name="unknown_risk_background">#10156125</color>
<color name="unknown_risk_background">#DADCE0</color>
<color name="unknown_risk">#ffffff</color>
<color name="syncing_background">#E8F0FE</color>
<color name="white">#FFFFFFFF</color>
<color name="disable_state">#9AFFFFFF</color>
</resources>
2 changes: 1 addition & 1 deletion demo/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<resources>
<string name="app_name">FHIR Engine Sample App</string>

<string name="title_patient_list">Registered Patients</string>
<string name="title_patient_list">Patient List</string>
<string name="title_patient_detail">SamplePatient Detail</string>

<string name="menu_about">About Fhir Engine</string>
Expand Down
15 changes: 13 additions & 2 deletions demo/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/colorStatusBar</item>
<item name="enabledMenuIconColor">@color/white</item>
<item name="disabledMenuIconColor">@color/disable_state</item>
</style>

<style name="AppTheme.NoActionBar">
Expand All @@ -37,6 +35,19 @@

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

<style name="AppTheme.Toolbar" parent="Widget.MaterialComponents.Toolbar">
<item name="colorPrimary">@android:color/white</item>
<item name="colorPrimaryDark">@android:color/white</item>
<item name="colorAccent">@android:color/white</item>
<item name="android:statusBarColor">@android:color/white</item>
<item name="enabledMenuIconColor">@android:color/black</item>
<item name="disabledMenuIconColor">@android:color/black</item>
<item name="titleTextColor">@android:color/black</item>
<item name="android:textColorPrimary">@android:color/black</item>
<item name="android:textColorSecondary">@android:color/black</item>
<item name="actionMenuTextColor">@android:color/black</item>
</style>

<style name="AppCard" parent="Widget.MaterialComponents.CardView">
<item name="cardElevation">8dp</item>
</style>
Expand Down

0 comments on commit bfe1f20

Please sign in to comment.