summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/drawable/ic_person.xml27
-rw-r--r--res/drawable/ic_warning.xml27
-rw-r--r--res/layout/contributors_search_result.xml34
-rw-r--r--res/layout/contributors_view.xml80
-rw-r--r--res/menu/contributors_menu.xml32
-rw-r--r--res/values/cm_colors.xml6
-rw-r--r--res/values/cm_strings.xml15
-rw-r--r--res/xml/device_info_settings.xml8
8 files changed, 227 insertions, 2 deletions
diff --git a/res/drawable/ic_person.xml b/res/drawable/ic_person.xml
new file mode 100644
index 0000000..9a211b4
--- /dev/null
+++ b/res/drawable/ic_person.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The CyanogenMod 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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="@color/theme_accent"
+ android:pathData="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8
+4v2h16v-2c0-2.66-5.33-4-8-4z" />
+</vector>
diff --git a/res/drawable/ic_warning.xml b/res/drawable/ic_warning.xml
new file mode 100644
index 0000000..4001b74
--- /dev/null
+++ b/res/drawable/ic_warning.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="512dp"
+ android:height="442.182dp"
+ android:viewportWidth="512"
+ android:viewportHeight="442.182">
+
+ <path
+ android:fillColor="#000"
+ android:pathData="M0,442.182h512L256,0L0,442.182z M279.272,372.363h-46.545v-46.545h46.545V372.363z
+M279.272,279.272h-46.545v-93.091 h46.545V279.272z" />
+</vector>
diff --git a/res/layout/contributors_search_result.xml b/res/layout/contributors_search_result.xml
new file mode 100644
index 0000000..c5607da
--- /dev/null
+++ b/res/layout/contributors_search_result.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp"
+ android:orientation="vertical"
+ android:layout_margin="16dp"
+ android:gravity="center_vertical">
+
+ <TextView android:id="@+id/contributor_name"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:drawableStart="@drawable/ic_person"
+ android:drawablePadding="8dp"
+ android:singleLine="true"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:gravity="center_vertical" />
+</LinearLayout>
diff --git a/res/layout/contributors_view.xml b/res/layout/contributors_view.xml
new file mode 100644
index 0000000..1c6a1ee
--- /dev/null
+++ b/res/layout/contributors_view.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The CyanogenMod 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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/contributors_cloud_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:contentDescription="@string/contributors_cloud_fragment_title"
+ android:visibility="gone"/>
+
+ <LinearLayout
+ android:id="@+id/contributors_cloud_loading"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_gravity="center"
+ android:visibility="visible">
+
+ <ProgressBar
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:indeterminateOnly="true"
+ android:layout_gravity="center_horizontal"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/contributors_cloud_loading_message">
+ </TextView>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/contributors_cloud_failed"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_gravity="center"
+ android:visibility="gone">
+
+ <ImageView
+ android:layout_width="64dp"
+ android:layout_height="64dp"
+ android:src="@drawable/ic_warning"
+ android:contentDescription="@string/contributors_cloud_failed_message"
+ android:layout_gravity="center_horizontal"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/contributors_cloud_failed_message">
+ </TextView>
+ </LinearLayout>
+
+ <ListView
+ android:id="@+id/contributors_cloud_search_results"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone" />
+</FrameLayout>
diff --git a/res/menu/contributors_menu.xml b/res/menu/contributors_menu.xml
new file mode 100644
index 0000000..d6473a1
--- /dev/null
+++ b/res/menu/contributors_menu.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The CyanogenMod 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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/contributors_search"
+ android:title="@string/search_menu"
+ android:icon="@*android:drawable/ic_search_api_material"
+ android:showAsAction="collapseActionView|ifRoom"
+ android:actionViewClass="android.widget.SearchView" />
+ <item
+ android:id="@+id/contributor_info"
+ android:title="@string/contributor_info_menu"
+ android:showAsAction="never" />
+ <item
+ android:id="@+id/contributions_info"
+ android:title="@string/contributions_info_menu"
+ android:showAsAction="never" />
+</menu>
diff --git a/res/values/cm_colors.xml b/res/values/cm_colors.xml
index e4ba40a..751108c 100644
--- a/res/values/cm_colors.xml
+++ b/res/values/cm_colors.xml
@@ -76,4 +76,8 @@ limitations under the License.
<!-- Storage Summary Hard colors-->
<color name="storage_summary_text_color">#ff607d8b</color>
<color name="storage_summary_used_text_color">#8a000000</color>
-</resources>
+
+ <!-- Contributors -->
+ <color name="contributors_cloud_fg_color">@color/theme_accent</color>
+ <color name="contributors_cloud_selected_color">#ff5252</color>
+</resources> \ No newline at end of file
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index f28615f..eb68f1a 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -827,4 +827,19 @@
<string name="pa_login_checking_password">Checking account\u2026</string>
<string name="pa_login_incorrect_login">Login was incorrect</string>
+ <!-- Contributors cloud activity -->
+ <string name="contributors_cloud_fragment_title">Contributors</string>
+ <string name="contributors_cloud_loading_message">Loading contributors data\u2026</string>
+ <string name="contributors_cloud_failed_message">Cannot load contributors data</string>
+ <string name="contributor_info_menu">Contributor info</string>
+ <string name="contributor_info_msg">
+ <![CDATA[<b>Name:</b> <xliff:g id="name">%1$s</xliff:g><br/><br/>
+ <b>Nick:</b> <xliff:g id="nick">%2$s</xliff:g><br/><br/>
+ <b>Commits:</b> <xliff:g id="commits">%3$s</xliff:g><br/><br/>
+ <b>Rank:</b> <xliff:g id="rank">%4$s</xliff:g>]]></string>
+ <string name="contributions_info_menu">Contributions info</string>
+ <string name="contributions_info_msg">
+ <![CDATA[<b>Total contributors:</b> <xliff:g id="total_contributors">%1$s</xliff:g><br/><br/>
+ <b>Total commits:</b> <xliff:g id="total_commits">%2$s</xliff:g><br/><br/>
+ <b>Last update:</b> <xliff:g id="date">%3$s</xliff:g>]]></string>
</resources>
diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml
index 776402c..6cda1ed 100644
--- a/res/xml/device_info_settings.xml
+++ b/res/xml/device_info_settings.xml
@@ -83,6 +83,12 @@
android:title="@string/device_feedback">
</PreferenceScreen>
+ <!-- Contributors cloud -->
+ <PreferenceScreen android:key="contributors_cloud"
+ android:title="@string/contributors_cloud_fragment_title"
+ android:fragment="com.android.settings.contributors.ContributorsCloudFragment" >
+ </PreferenceScreen>
+
<!-- Device hardware model -->
<Preference android:key="device_model"
style="?android:preferenceInformationStyle"
@@ -149,4 +155,4 @@
android:title="@string/selinux_status"
android:summary="@string/selinux_status_enforcing"/>
-</PreferenceScreen>
+</PreferenceScreen> \ No newline at end of file