mirror of
https://github.com/nerzhul/ownCloud-SMS-App.git
synced 2026-08-22 05:43:05 +00:00
Add a basic main activity for ownCloud SMS beginers. We need to have a good tutorial, this is a poc
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright (c) 2014, Loic Blot <loic.blot@unix-experience.fr>
|
||||
* Copyright (c) 2014-2015, Loic Blot <loic.blot@unix-experience.fr>
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright (c) 2014-2015, Loic Blot <loic.blot@unix-experience.fr>
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
-->
|
||||
|
||||
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="fr.unix_experience.owncloud_sms.MainActivity" />
|
||||
@@ -0,0 +1,74 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright (c) 2014-2015, Loic Blot <loic.blot@unix-experience.fr>
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="fr.unix_experience.owncloud_sms.MainActivity$PlaceholderFragment" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_tv_accounts"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:text="Add an account"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/mail_button_accounts"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/main_tv_accounts"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="26dp"
|
||||
android:text="Go to Accounts and Sync" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/main_button_settings"
|
||||
android:layout_alignLeft="@+id/main_tv_accounts"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:text="Change app settings"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/main_button_settings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Go to Settings" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,61 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright (c) 2014-2015, Loic Blot <loic.blot@unix-experience.fr>
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="fr.unix_experience.owncloud_sms.MainActivity$PlaceholderFragment" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/section_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_title_welcome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:text="Welcome"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_tv_welcome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/section_label"
|
||||
android:layout_below="@+id/section_label"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="Welcome to ownCloud SMS application. This application let you synchronise your SMS to your ownCloud instance using SMS app."
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,87 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright (c) 2014-2015, Loic Blot <loic.blot@unix-experience.fr>
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="fr.unix_experience.owncloud_sms.MainActivity$PlaceholderFragment" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="22dp"
|
||||
android:minHeight="36dp"
|
||||
android:text="Rate us !"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:text="Thanks to"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_rateUs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@+id/TextView01"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="ownCloud developpers"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/textView2"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="If you like this application, please give rate us on Google Play Store"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/textView1"
|
||||
android:layout_alignLeft="@+id/tv_rateUs"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:text="Rate us !"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -8,6 +8,5 @@
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never"/>
|
||||
<item android:id="@+id/sync_now" android:title="@string/sync_now"></item>
|
||||
|
||||
</menu>
|
||||
|
||||
+23
-24
@@ -26,22 +26,22 @@
|
||||
*/
|
||||
-->
|
||||
<resources>
|
||||
<!-- Translation version, reference for translators -->
|
||||
<string name="translation_version">3</string>
|
||||
|
||||
<!-- System strings, do not translate -->
|
||||
<!-- Translation version, reference for translators -->
|
||||
<string name="translation_version">3</string>
|
||||
|
||||
<!-- System strings, do not translate -->
|
||||
<string name="app_name">ownCloud-SMS</string>
|
||||
<string name="account_type">fr.unix_experience.owncloud_sms</string>
|
||||
<string name="account_authority">fr.unix_experience.owncloud_sms.datasync.provider</string>
|
||||
<string name="slowsync_account_authority">fr.unix_experience.owncloud_sms.datasync.slowsync_provider</string>
|
||||
|
||||
<string name="target_package">fr.unix_experience.owncloud_sms</string>
|
||||
<string name="login_logo">Login logo</string>
|
||||
|
||||
|
||||
<!-- System strings: preferences -->
|
||||
<string name="shared_preference_file">ownCloudSMSPrefs</string>
|
||||
<string name="pref_lastmsgdate">last_message_date</string>
|
||||
|
||||
|
||||
<!-- Translations must begin there -->
|
||||
<!-- Preferences -->
|
||||
<string name="pref_title_sync">SMS - Fast</string>
|
||||
@@ -51,17 +51,14 @@
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="sync_now">Synchronize now</string>
|
||||
<string name="pref_category_sync">Synchronization</string>
|
||||
|
||||
<string name="title_global_pref_to_general_prefs">General preferences</string>
|
||||
<string name="summary_global_pref_to_general_prefs">Sync options</string>
|
||||
<string name="summary_notif_prefs">Notifications</string>
|
||||
|
||||
<string name="title_global_pref_to_general_prefs">General preferences</string>
|
||||
<string name="summary_global_pref_to_general_prefs">Sync options</string>
|
||||
<string name="summary_notif_prefs">Notifications</string>
|
||||
<string name="pref_header_data_sync">Data & sync</string>
|
||||
|
||||
<string name="title_activity_general_settings">General Settings</string>
|
||||
<string name="title_activity_general_settings">General Settings</string>
|
||||
|
||||
<string-array name="pref_sync_frequency_titles">
|
||||
<item>5 minutes</item>
|
||||
<item>5 minutes</item>
|
||||
<item>15 minutes</item>
|
||||
<item>30 minutes</item>
|
||||
<item>1 hour</item>
|
||||
@@ -72,7 +69,7 @@
|
||||
<item>Never</item>
|
||||
</string-array>
|
||||
<string-array name="pref_sync_frequency_values">
|
||||
<item>5</item>
|
||||
<item>5</item>
|
||||
<item>15</item>
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
@@ -82,7 +79,6 @@
|
||||
<item>1440</item>
|
||||
<item>-1</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_slow_sync_frequency_titles">
|
||||
<item>1 hour</item>
|
||||
<item>3 hours</item>
|
||||
@@ -91,7 +87,6 @@
|
||||
<item>24 hours</item>
|
||||
<item>Never</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_slow_sync_frequency_values">
|
||||
<item>60</item>
|
||||
<item>180</item>
|
||||
@@ -100,7 +95,7 @@
|
||||
<item>1440</item>
|
||||
<item>-1</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
<string name="title_activity_login">Sign in</string>
|
||||
|
||||
<!-- Login -->
|
||||
@@ -115,18 +110,17 @@
|
||||
<string name="error_invalid_server_address">Invalid server address</string>
|
||||
<string name="error_connection_failed">Connection failed, ensure this is the right server</string>
|
||||
<string name="error_http_connection_failed">Unable to perform a HTTP connection. Please ensure there is a web server</string>
|
||||
|
||||
|
||||
<string-array name="protocol_array">
|
||||
<item>https://</item>
|
||||
<item>https://</item>
|
||||
<item>http://</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
<!-- Notifications -->
|
||||
<string name="sync_title">Sync process</string>
|
||||
<string name="sync_inprogress">Sync in progress...</string>
|
||||
<string name="fatal_error">Fatal error ! </string>
|
||||
|
||||
|
||||
|
||||
<!-- Errors -->
|
||||
<string name="err_sync_get_smslist">Error #1: Invalid data received from server when getting previous messages</string>
|
||||
<string name="err_sync_craft_http_request">Error #2: Error while crafting HTTP request</string>
|
||||
@@ -143,5 +137,10 @@
|
||||
<string name="err_sync_http_request_resp">Error #14: Unable to parse server response</string>
|
||||
<string name="err_sync_http_request_parse_resp">Error #15: Unable to parse server response</string>
|
||||
<string name="err_sync_no_connection_available">Error #16: No data connection available</string>
|
||||
|
||||
<string name="title_activity_main">MainActivity</string>
|
||||
<string name="title_section1">Section 1</string>
|
||||
<string name="title_section2">Section 2</string>
|
||||
<string name="title_section3">Section 3</string>
|
||||
<string name="hello_world">Hello world!</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user