fix: Add build script and fix manifest
- Add build-apk.sh for easy compilation - Simplify AndroidManifest.xml - Fix themes.xml to use basic Android themes - Enable BuildConfig - Add okhttp-dnsoverhttps dependency
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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
|
||||
|
||||
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.
|
||||
-->
|
||||
<!-- Default background styles for car buttons when enabled/disabled,
|
||||
focused/unfocused, and pressed/unpressed -->
|
||||
<!-- TODO(b/175161842) Add rotary fill color -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_focused="true" android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/car_button_radius"/>
|
||||
<solid android:color="@*android:color/car_grey_300"/>
|
||||
<stroke android:width="8dp"
|
||||
android:color="#0059B3"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_focused="true" android:state_pressed="true" android:state_ux_restricted="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/car_button_radius"/>
|
||||
<solid android:color="@*android:color/car_grey_300"/>
|
||||
<stroke android:width="4dp"
|
||||
android:color="#0059B3"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_focused="true" android:state_ux_restricted="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/car_button_radius"/>
|
||||
<solid android:color="@*android:color/car_grey_300"/>
|
||||
<stroke android:width="8dp"
|
||||
android:color="#0059B3"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_focused="true" android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/car_button_radius"/>
|
||||
<solid android:color="?android:attr/colorButtonNormal"/>
|
||||
<stroke android:width="4dp"
|
||||
android:color="#0059B3"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_focused="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/car_button_radius"/>
|
||||
<solid android:color="?android:attr/colorButtonNormal"/>
|
||||
<stroke android:width="8dp"
|
||||
android:color="#0059B3"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/car_button_radius"/>
|
||||
<solid android:color="@*android:color/car_grey_300"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_ux_restricted="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/car_button_radius"/>
|
||||
<solid android:color="@*android:color/car_grey_300"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<ripple android:color="?android:attr/colorControlHighlight">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/car_button_radius"/>
|
||||
<solid android:color="?android:attr/colorButtonNormal"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2019 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
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_focused="true">
|
||||
<layer-list>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#3D94CBFF"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="8dp" android:color="#94CBFF"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
</item>
|
||||
<item>
|
||||
<ripple android:color="?android:attr/colorControlHighlight">
|
||||
<item android:id="@android:id/mask">
|
||||
<color android:color="@*android:color/car_white_1000"/>
|
||||
</item>
|
||||
</ripple>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@*android:color/car_accent" />
|
||||
<size
|
||||
android:width="@*android:dimen/car_seekbar_thumb_size"
|
||||
android:height="@*android:dimen/car_seekbar_thumb_size" />
|
||||
</shape>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@*android:color/car_accent_dark" />
|
||||
<size
|
||||
android:width="@*android:dimen/car_seekbar_thumb_size"
|
||||
android:height="@*android:dimen/car_seekbar_thumb_size" />
|
||||
</shape>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@*android:color/car_accent_light" />
|
||||
<size
|
||||
android:width="@*android:dimen/car_seekbar_thumb_size"
|
||||
android:height="@*android:dimen/car_seekbar_thumb_size" />
|
||||
</shape>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_seekbar_track_background" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<clip>
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_seekbar_track_secondary_progress" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_accent" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<!-- Drawable of seekbar track. Uses dark color for track. -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_seekbar_track_background_dark" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<clip>
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_seekbar_track_secondary_progress" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_accent_light" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<!-- Drawable of seekbar track. Uses light color for track. -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_seekbar_track_background_light" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<clip>
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_seekbar_track_secondary_progress" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape android:shape="line">
|
||||
<stroke
|
||||
android:width="@*android:dimen/car_seekbar_height"
|
||||
android:color="@*android:color/car_accent_dark" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2019 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
|
||||
|
||||
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.
|
||||
-->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:gravity="center_vertical|fill_horizontal"
|
||||
android:top="@dimen/car_switch_thumb_margin_size"
|
||||
android:bottom="@dimen/car_switch_thumb_margin_size">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/car_switch"/>
|
||||
<size
|
||||
android:width="@dimen/car_switch_thumb_size"
|
||||
android:height="@dimen/car_switch_thumb_size"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2020 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
|
||||
|
||||
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.
|
||||
-->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:height="@dimen/car_touch_target_size_minus_one"
|
||||
android:width="@dimen/car_touch_target_size_minus_one"
|
||||
android:gravity="center">
|
||||
<selector>
|
||||
<item android:state_focused="true" android:state_pressed="true">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#8A94CBFF"/>
|
||||
<stroke android:width="4dp"
|
||||
android:color="#94CBFF"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_focused="true">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#3D94CBFF"/>
|
||||
<stroke android:width="8dp"
|
||||
android:color="#94CBFF"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
<item android:gravity="center_vertical|fill_horizontal"
|
||||
android:left="@dimen/car_switch_track_margin_size"
|
||||
android:right="@dimen/car_switch_track_margin_size">
|
||||
<shape
|
||||
android:shape="rectangle"
|
||||
android:tint="@color/car_switch_track">
|
||||
<corners android:radius="7dp" />
|
||||
<solid android:color="@color/white_disabled_material" />
|
||||
<size android:height="14dp" />
|
||||
<padding
|
||||
android:right="@dimen/car_switch_track_margin_size"
|
||||
android:left="@dimen/car_switch_track_margin_size"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
Reference in New Issue
Block a user