mirror of https://github.com/tasks/tasks
Themed the custom buttons in the time picker and removed all those nasty shape drawables
parent
2dc7e45a0d
commit
9453b3b3d6
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:topRightRadius="5dip"
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:topRightRadius="5dip"
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_checked="false"
|
|
||||||
android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/date_shortcut_bottom_off" />
|
|
||||||
<item android:state_checked="true"
|
|
||||||
android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/date_shortcut_bottom_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:bottomRightRadius="5dip"
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:bottomRightRadius="5dip"
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_checked="false"
|
|
||||||
android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/date_shortcut_middle_off" />
|
|
||||||
<item android:state_checked="true"
|
|
||||||
android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/date_shortcut_middle_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
</shape>
|
|
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_checked="false"
|
|
||||||
android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/date_shortcut_standalone_off" />
|
|
||||||
<item android:state_checked="true"
|
|
||||||
android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/date_shortcut_standalone_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"
|
|
||||||
android:topRightRadius="5dip"
|
|
||||||
android:bottomLeftRadius="5dip"
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"
|
|
||||||
android:topRightRadius="5dip"
|
|
||||||
android:bottomLeftRadius="5dip"
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_checked="false"
|
|
||||||
android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/date_shortcut_top_off" />
|
|
||||||
<item android:state_checked="true"
|
|
||||||
android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/date_shortcut_top_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"
|
|
||||||
android:topRightRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"
|
|
||||||
android:topRightRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_pressed="false"
|
|
||||||
android:drawable="@drawable/deadline_timepicker_button_bl_off" />
|
|
||||||
<item android:state_pressed="true"
|
|
||||||
android:drawable="@drawable/deadline_timepicker_button_bl_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_pressed="false"
|
|
||||||
android:drawable="@drawable/deadline_timepicker_button_br_off" />
|
|
||||||
<item android:state_pressed="true"
|
|
||||||
android:drawable="@drawable/deadline_timepicker_button_br_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_pressed="false"
|
|
||||||
android:drawable="@drawable/deadline_timepicker_button_tl_off" />
|
|
||||||
<item android:state_pressed="true"
|
|
||||||
android:drawable="@drawable/deadline_timepicker_button_tl_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_pressed="false"
|
|
||||||
android:drawable="@drawable/deadline_timepicker_button_tr_off" />
|
|
||||||
<item android:state_pressed="true"
|
|
||||||
android:drawable="@drawable/deadline_timepicker_button_tr_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:topRightRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:topRightRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_checked="false"
|
|
||||||
android:drawable="@drawable/timepicker_am_btn_off" />
|
|
||||||
<item android:state_checked="true"
|
|
||||||
android:drawable="@drawable/timepicker_am_btn_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="5dip"
|
|
||||||
android:bottomRightRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_pressed="false" android:state_enabled="true"
|
|
||||||
android:state_focused="false" android:drawable="@drawable/timepicker_down_normal" />
|
|
||||||
<item android:state_pressed="true" android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/timepicker_down_pressed" />
|
|
||||||
<item android:state_pressed="false" android:state_enabled="true"
|
|
||||||
android:state_focused="true" android:drawable="@drawable/timepicker_down_selected" />
|
|
||||||
<item android:state_pressed="false" android:state_enabled="false"
|
|
||||||
android:state_focused="false" android:drawable="@drawable/timepicker_down_disabled" />
|
|
||||||
<item android:state_pressed="false" android:state_enabled="false"
|
|
||||||
android:state_focused="true" android:drawable="@drawable/timepicker_down_disabled_focused" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_checked="false"
|
|
||||||
android:drawable="@drawable/timepicker_pm_btn_off" />
|
|
||||||
<item android:state_checked="true"
|
|
||||||
android:drawable="@drawable/timepicker_pm_btn_on" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<corners
|
|
||||||
android:topRightRadius="5dip"
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<stroke
|
|
||||||
android:width="2dip"
|
|
||||||
android:color="@color/task_edit_deadline_gray"/>
|
|
||||||
<solid
|
|
||||||
android:color="@color/blue_theme_color"/>
|
|
||||||
<corners
|
|
||||||
android:topRightRadius="5dip"
|
|
||||||
android:bottomLeftRadius="5dip"/>
|
|
||||||
</shape>
|
|
@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2008 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_pressed="false" android:state_enabled="true"
|
|
||||||
android:state_focused="false" android:drawable="@drawable/timepicker_up_normal" />
|
|
||||||
<item android:state_pressed="true" android:state_enabled="true"
|
|
||||||
android:drawable="@drawable/timepicker_up_pressed" />
|
|
||||||
<item android:state_pressed="false" android:state_enabled="true"
|
|
||||||
android:state_focused="true" android:drawable="@drawable/timepicker_up_selected" />
|
|
||||||
<item android:state_pressed="false" android:state_enabled="false"
|
|
||||||
android:state_focused="false" android:drawable="@drawable/timepicker_up_disabled" />
|
|
||||||
<item android:state_pressed="false" android:state_enabled="false"
|
|
||||||
android:state_focused="true" android:drawable="@drawable/timepicker_up_disabled_focused" />
|
|
||||||
|
|
||||||
</selector>
|
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.todoroo.astrid.ui;
|
||||||
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.Matrix;
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.graphics.RectF;
|
||||||
|
import android.graphics.drawable.ShapeDrawable;
|
||||||
|
import android.graphics.drawable.StateListDrawable;
|
||||||
|
import android.graphics.drawable.shapes.RoundRectShape;
|
||||||
|
import android.graphics.drawable.shapes.Shape;
|
||||||
|
|
||||||
|
public class CustomBorderDrawable extends ShapeDrawable {
|
||||||
|
private final Paint fillpaint, strokepaint;
|
||||||
|
private final float strokeWidth;
|
||||||
|
|
||||||
|
public CustomBorderDrawable(Shape s, int fill, int stroke, int strokeWidth) {
|
||||||
|
super(s);
|
||||||
|
fillpaint = new Paint(this.getPaint());
|
||||||
|
fillpaint.setColor(fill);
|
||||||
|
strokepaint = new Paint(fillpaint);
|
||||||
|
strokepaint.setStyle(Paint.Style.STROKE);
|
||||||
|
strokepaint.setStrokeWidth(strokeWidth);
|
||||||
|
strokepaint.setColor(stroke);
|
||||||
|
this.strokeWidth = strokeWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDraw(Shape shape, Canvas canvas, Paint paint) {
|
||||||
|
shape.resize(canvas.getWidth(), canvas.getHeight());
|
||||||
|
shape.draw(canvas, fillpaint);
|
||||||
|
|
||||||
|
Matrix matrix = new Matrix();
|
||||||
|
matrix.setRectToRect(new RectF(0, 0, canvas.getWidth(), canvas.getHeight()),
|
||||||
|
new RectF(strokeWidth/2, strokeWidth/2, canvas.getWidth() - strokeWidth/2, canvas.getHeight() - strokeWidth/2),
|
||||||
|
Matrix.ScaleToFit.FILL);
|
||||||
|
canvas.concat(matrix);
|
||||||
|
shape.draw(canvas, strokepaint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static StateListDrawable customButton(int tl, int tr, int br, int bl, int onColor, int offColor, int borderColor, int strokeWidth) {
|
||||||
|
Shape shape = new RoundRectShape(new float[] { tl, tl, tr, tr, br, br, bl, bl}, null, null);
|
||||||
|
ShapeDrawable sdOn = new CustomBorderDrawable(shape, onColor, borderColor, strokeWidth);
|
||||||
|
ShapeDrawable sdOff = new CustomBorderDrawable(shape, offColor, borderColor, strokeWidth);
|
||||||
|
|
||||||
|
StateListDrawable stld = new StateListDrawable();
|
||||||
|
stld.addState(new int[] { android.R.attr.state_pressed }, sdOn);
|
||||||
|
stld.addState(new int[] { android.R.attr.state_checked }, sdOn);
|
||||||
|
stld.addState(new int[] { android.R.attr.state_enabled }, sdOff);
|
||||||
|
return stld;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue