<service android:name=".media.MediaService" />
<activity android:name=".ui.activity.PinCodeActivity" />
- <activity android:name=".ui.activity.AccountSelectActivity" android:uiOptions="none" android:label="@string/prefs_accounts"></activity>
<activity android:name=".ui.activity.ConflictsResolveActivity"/>
<activity android:name=".ui.activity.GenericExplanationActivity"/>
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ownCloud Android client application
-
- Copyright (C) 2012 Bartek Przybylski
- Copyright (C) 2012-2013 ownCloud Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2,
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item android:id="@+id/createAccount" android:title="@string/create_account" android:showAsAction="ifRoom|withText"></item>
-
-
-</menu>
\ No newline at end of file
<string name="network_error_connect_timeout_exception">حدث خطأ أثناء إنتظار الخادم، لم يكن من الممكن القيام بالعملية</string>
<string name="network_host_not_available">تعذر إكمال العملية، الخادم غير متوفر</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">حسابات</string>
</resources>
<string name="forbidden_permissions_create">за създаване на файла</string>
<string name="uploader_upload_forbidden_permissions">за качване в тази папка</string>
<string name="downloader_download_file_not_found">Файлът вече не се намира на този сървър</string>
+ <string name="prefs_category_accounts">Профили</string>
+ <string name="prefs_add_account">Добави профил</string>
+ <string name="auth_redirect_non_secure_connection_title">Подсигурената връзка бе пренасочена към не подсигурен канал.</string>
</resources>
<string name="common_remove">অপসারণ</string>
<string name="activity_chooser_send_file_title">পাঠাও</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">একাউন্ট</string>
</resources>
<string name="network_error_connect_timeout_exception">Hi ha hagut un error esperant el servidor, l\'operació no s\'ha pogut realitzar</string>
<string name="network_host_not_available">La operació no s\'ha pogut completar, no es pot accedir al servidor</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Comptes</string>
</resources>
<string name="forbidden_permissions_create">vytvořit tento soubor</string>
<string name="uploader_upload_forbidden_permissions">nahrávat do tohoto adresáře</string>
<string name="downloader_download_file_not_found">Soubor není již více dostupný na tomto serveru</string>
+ <string name="prefs_category_accounts">Účty</string>
+ <string name="prefs_add_account">Přidat účet</string>
+ <string name="auth_redirect_non_secure_connection_title">Bezpečené spojení je přesměrováno na nezabezpečenou trasu.</string>
</resources>
<string name="conflict_dont_upload">Peidio llwytho i fyny</string>
<string name="activity_chooser_send_file_title">Anfon</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Cyfrifon</string>
</resources>
<string name="forbidden_permissions_create">til at oprette filen</string>
<string name="uploader_upload_forbidden_permissions">til at overføre til denne mappe</string>
<string name="downloader_download_file_not_found">Filen er ikke længere tilgængelig på serveren</string>
+ <string name="prefs_category_accounts">Konti</string>
</resources>
<string name="activity_chooser_send_file_title">Senden</string>
<string name="clipboard_text_copied">In die Zwischenablage kopiert</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Konten</string>
</resources>
<string name="forbidden_permissions_create">eine Datei zu erstellen</string>
<string name="uploader_upload_forbidden_permissions">in diesem Order etwas hochzuladen</string>
<string name="downloader_download_file_not_found">Diese Datei steht auf dem Server nicht mehr zur Verfügung</string>
+ <string name="prefs_category_accounts">Konten</string>
+ <string name="prefs_add_account">Konto hinzufügen</string>
+ <string name="auth_redirect_non_secure_connection_title">Die gesicherte Verbindung wird auf eine nicht sichere Route weitergeleitet.</string>
</resources>
<string name="forbidden_permissions_create">eine Datei zu erstellen</string>
<string name="uploader_upload_forbidden_permissions">in diesem Order etwas hochzuladen</string>
<string name="downloader_download_file_not_found">Diese Datei steht auf dem Server nicht mehr zur Verfügung</string>
+ <string name="prefs_category_accounts">Konten</string>
+ <string name="prefs_add_account">Konto hinzufügen</string>
+ <string name="auth_redirect_non_secure_connection_title">Die gesicherte Verbindung wird auf eine nicht sichere Route weitergeleitet.</string>
</resources>
<string name="forbidden_permissions_create">για να δημιουργήσετε το αρχείο</string>
<string name="uploader_upload_forbidden_permissions">για να μεταφορτώσετε σε αυτό τον κατάλογο</string>
<string name="downloader_download_file_not_found">Αυτό το αρχείο δεν είναι πια διαθέσιμο στο διακομιστή</string>
+ <string name="prefs_category_accounts">Λογαριασμοί</string>
</resources>
<string name="forbidden_permissions_create">to create the file</string>
<string name="uploader_upload_forbidden_permissions">to upload to this folder</string>
<string name="downloader_download_file_not_found">The file is no longer available on the server</string>
+ <string name="prefs_category_accounts">Accounts</string>
+ <string name="prefs_add_account">Add account</string>
+ <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected through an unsecured route.</string>
</resources>
<string name="clipboard_text_copied">Kopiita en la tondejon</string>
<string name="network_error_socket_exception">Eraro okazis dum konekto al la servilo.</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Kontoj</string>
</resources>
<string name="activity_chooser_send_file_title">Mandar</string>
<string name="clipboard_text_copied">Copiado al portapapeles</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Cuentas</string>
</resources>
<string name="conflict_dont_upload">No subir</string>
<string name="error__upload__local_file_not_copied">%1$s no pudo ser copiado a la carpeta local %2$s</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Cuentas</string>
</resources>
<string name="activity_chooser_send_file_title">Enviar</string>
<string name="clipboard_text_copied">Copiado al portapapeles</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Cuentas</string>
</resources>
<string name="forbidden_permissions_create">para crear el archivo</string>
<string name="uploader_upload_forbidden_permissions">para subir archivos a esta carpeta</string>
<string name="downloader_download_file_not_found">Este archivo ya no se encuentra en el servidor</string>
+ <string name="prefs_category_accounts">Cuentas</string>
+ <string name="prefs_add_account">Agregar cuenta</string>
+ <string name="auth_redirect_non_secure_connection_title">La conexión segura está siendo redirigida por una ruta insegura.</string>
</resources>
<string name="forbidden_permissions_create">faili loomiseks</string>
<string name="uploader_upload_forbidden_permissions">sellesse kausta laadimiseks</string>
<string name="downloader_download_file_not_found">Fail ei ole serveris enam kättesaadav</string>
+ <string name="prefs_category_accounts">Kontod</string>
</resources>
<string name="forbidden_permissions_create">fitxategia sortzeko</string>
<string name="uploader_upload_forbidden_permissions">karpeta honetara igotzeko</string>
<string name="downloader_download_file_not_found">Fitxategia jadanik ez dago eskuragarri zerbitzarian</string>
+ <string name="prefs_category_accounts">Kontuak</string>
+ <string name="prefs_add_account">Gehitu kontua</string>
+ <string name="auth_redirect_non_secure_connection_title">Konexio segurua birbideratu da segurua ez den bide batetik.</string>
</resources>
<string name="activity_chooser_send_file_title">ارسال</string>
<string name="clipboard_text_copied">کپی به کلیپ بورد</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">حسابها</string>
</resources>
<string name="forbidden_permissions_create">luoda tiedostoa</string>
<string name="uploader_upload_forbidden_permissions">lähettää tähän kansioon</string>
<string name="downloader_download_file_not_found">Tämä tiedosto ei ole enää palvelimella käytettävissä</string>
+ <string name="prefs_category_accounts">Tilit</string>
+ <string name="prefs_add_account">Lisää tili</string>
+ <string name="auth_redirect_non_secure_connection_title">Salattu yhteys on ohjattu uudelleen salaamattoman reitin kautta.</string>
</resources>
<string name="uploader_info_uploading">Téléversement</string>
<string name="file_list_empty">Il n\'y a rien ici ! Envoyez donc quelque chose :)</string>
<string name="file_list_loading">Chargement…</string>
+ <string name="local_file_list_empty">Aucun fichier n\'est présent dans ce dossier.</string>
<string name="filedetails_select_file">Effleurez un fichier pour afficher les informations complémentaires</string>
<string name="filedetails_size">Taille :</string>
<string name="filedetails_type">Type :</string>
<string name="forbidden_permissions_create">afin de créer ce fichier</string>
<string name="uploader_upload_forbidden_permissions">afin d’importer dans ce répertoire</string>
<string name="downloader_download_file_not_found">Ce fichier n’est plus disponible sur le serveur</string>
+ <string name="prefs_category_accounts">Comptes</string>
+ <string name="prefs_add_account">Ajouter un compte</string>
</resources>
<string name="forbidden_permissions_create">para crear o ficheiro</string>
<string name="uploader_upload_forbidden_permissions">para envialo a este cartafol</string>
<string name="downloader_download_file_not_found">O ficheiro xa non está dispoñíbel no servidor</string>
+ <string name="prefs_category_accounts">Contas</string>
+ <string name="prefs_add_account">Engadir unha conta</string>
+ <string name="auth_redirect_non_secure_connection_title">A conexión segura está a ser redirixida a través dunha ruta non segura.</string>
</resources>
<string name="conflict_dont_upload">לא להעלות</string>
<string name="activity_chooser_send_file_title">שליחה</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">חשבונות</string>
</resources>
<string name="common_rename">Promjeni ime</string>
<string name="common_remove">Makni</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Korisnićki računi</string>
</resources>
<string name="copy_link">Link másolása</string>
<string name="clipboard_text_copied">Bemásolva a vágólapra</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Fiókok</string>
</resources>
<string name="preview_image_description">Pratilik gambar</string>
<string name="activity_chooser_send_file_title">Kirim</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Akun</string>
</resources>
<string name="forbidden_permissions_create">per creare il file</string>
<string name="uploader_upload_forbidden_permissions">per caricare in questa cartella</string>
<string name="downloader_download_file_not_found">Il file non è più disponibile sul server</string>
+ <string name="prefs_category_accounts">Account</string>
+ <string name="prefs_add_account">Aggiungi account</string>
+ <string name="auth_redirect_non_secure_connection_title">La connessione sicura è rediretta su un percorso non sicuro.</string>
</resources>
<string name="forbidden_permissions_create">ファイルを作成</string>
<string name="uploader_upload_forbidden_permissions">フォルダをアップロード</string>
<string name="downloader_download_file_not_found">ファイルはサーバー上で利用できません</string>
+ <string name="prefs_category_accounts">アカウント</string>
</resources>
<string name="activity_chooser_send_file_title">გაგზავნა</string>
<string name="clipboard_text_copied">კოპირებულია კლიპბორდში</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">ანგარიში</string>
</resources>
<string name="ssl_validator_label_signature">ហត្ថលេខា:</string>
<string name="activity_chooser_send_file_title">ផ្ញើ</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">គណនី</string>
</resources>
<string name="copy_link">링크 복사</string>
<string name="clipboard_text_copied">클립보드로 복사됨</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">계정</string>
</resources>
<string name="common_error">ههڵه</string>
<string name="uploader_info_dirname">ناوی بوخچه</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">هەژمارەکان</string>
</resources>
<string name="conflict_dont_upload">Net eroplueden</string>
<string name="activity_chooser_send_file_title">Schécken</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Accounten</string>
</resources>
<string name="copy_link">Kopijuoti nuorodą</string>
<string name="clipboard_text_copied">Nukopijuota į talpyklę</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Paskyros</string>
</resources>
<string name="conflict_dont_upload">Neaugšupielādēt</string>
<string name="activity_chooser_send_file_title">Sūtīt</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Konti</string>
</resources>
<string name="conflict_overwrite">Препиши</string>
<string name="activity_chooser_send_file_title">Прати</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Сметки</string>
</resources>
<string name="common_remove">Buang</string>
<string name="confirmation_remove_local">Lokal sahaja</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Akaun</string>
</resources>
<string name="uploader_info_uploading">Laster opp</string>
<string name="file_list_empty">Ingenting her. Last opp noe!</string>
<string name="file_list_loading">Laster...</string>
+ <string name="local_file_list_empty">Det er ingen filer i denne mappen.</string>
<string name="filedetails_select_file">Trykk på en fil for å vise ekstra informasjon.</string>
<string name="filedetails_size">Størrelse:</string>
<string name="filedetails_type">Type:</string>
<string name="forbidden_permissions_create">å opprette filen</string>
<string name="uploader_upload_forbidden_permissions">å laste opp i denne mappen</string>
<string name="downloader_download_file_not_found">Filen finnes ikke på serveren lenger</string>
+ <string name="prefs_category_accounts">Kontoer</string>
</resources>
<string name="forbidden_permissions_create">om dit bestand te creëren</string>
<string name="uploader_upload_forbidden_permissions">om dit bestand in deze map te uploaden</string>
<string name="downloader_download_file_not_found">Dit bestand is niet langer beschikbaar op de server</string>
+ <string name="prefs_category_accounts">Accounts</string>
+ <string name="prefs_add_account">Toevoegen account</string>
+ <string name="auth_redirect_non_secure_connection_title">De beveiligde verbinding is omgeleid via een onveilige route.</string>
</resources>
<string name="instant_upload_on_wifi">Berre last opp bilete over WiFi</string>
<string name="activity_chooser_send_file_title">Send</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Kontoar</string>
</resources>
<string name="pincode_enter_pin_code">Dintras ton PIN d\'App, se te plai</string>
<string name="common_rename">Torna nomenar</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Comptes</string>
</resources>
<string name="preview_image_description">ਚਿੱਤਰ ਝਲਕ</string>
<string name="activity_chooser_send_file_title">ਭੇਜੋ</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">ਅਕਾਊਂਟ</string>
</resources>
<string name="forbidden_permissions_create">do utworzenia tego pliku</string>
<string name="uploader_upload_forbidden_permissions">do wgrania tego folderu</string>
<string name="downloader_download_file_not_found">Ten plik nie jest już dostępny na serwerze</string>
+ <string name="prefs_category_accounts">Konta</string>
</resources>
<string name="forbidden_permissions_create">para criar este arquivo</string>
<string name="uploader_upload_forbidden_permissions">para enviar para esta pasta</string>
<string name="downloader_download_file_not_found">Este arquivo não mais está disponível neste servidor</string>
+ <string name="prefs_category_accounts">Contas</string>
+ <string name="prefs_add_account">Adicionar uma conta</string>
+ <string name="auth_redirect_non_secure_connection_title">Conexão segura é redirecionada através de uma via não segura.</string>
</resources>
<string name="forbidden_permissions_create">para criar o ficheiro</string>
<string name="uploader_upload_forbidden_permissions">para carregar dentro desta pasta</string>
<string name="downloader_download_file_not_found">O ficheiro não está mais disponível no servidor</string>
+ <string name="prefs_category_accounts">Contas</string>
+ <string name="auth_redirect_non_secure_connection_title">Uma ligação segura foi redireccionada por uma rota insegura.</string>
</resources>
<string name="forbidden_permissions_create">pentru a crea fisierul</string>
<string name="uploader_upload_forbidden_permissions">pentru a încărca în acest folder</string>
<string name="downloader_download_file_not_found">Fișierul nu mai este disponibil pe server</string>
+ <string name="prefs_category_accounts">Conturi</string>
</resources>
<string name="forbidden_permissions_create">создать файл</string>
<string name="uploader_upload_forbidden_permissions">загрузить в эту папку</string>
<string name="downloader_download_file_not_found">Этот файл больше недоступен на сервере</string>
+ <string name="prefs_category_accounts">Учётные записи</string>
</resources>
<string name="filedisplay_no_file_selected">ගොනුවක් තෝරා නැත</string>
<string name="ssl_validator_btn_details_hide">සඟවන්න</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">ගිණුම්</string>
</resources>
<string name="network_error_connect_timeout_exception">Pri čakaní na odpoveď servera nastala chyba, operácia nemohla byť dokončená</string>
<string name="network_host_not_available">Operácia nemohla byť dokončená, server je nedostupný</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Účty</string>
</resources>
<string name="uploader_wrn_no_content_text">Ni prejete vsebine. Ni datotek za pošiljanje.</string>
<string name="uploader_error_forbidden_content">Oblak %1$s nima nastavljenih dovoljenj za dostop do vsebine v souporabi</string>
<string name="uploader_info_uploading">Pošiljanje</string>
- <string name="file_list_empty">Tukaj še ni ničesar. Najprej je treba kakšno datoteko poslati v oblak!</string>
+ <string name="file_list_empty">Tukaj še ni ničesar. Najprej je treba datoteke poslati v oblak!</string>
<string name="file_list_loading">Poteka nalaganje ...</string>
+ <string name="local_file_list_empty">V tej mapi ni datotek.</string>
<string name="filedetails_select_file">Pritisnite na datoteko za prikaz dodatnih podrobnosti.</string>
<string name="filedetails_size">Velikost:</string>
<string name="filedetails_type">Vrsta:</string>
<string name="forbidden_permissions_create">za ustvarjanje datoteke.</string>
<string name="uploader_upload_forbidden_permissions">za pošiljanje datoteke v oblak.</string>
<string name="downloader_download_file_not_found">Datoteka na strežniku ni več na voljo.</string>
+ <string name="prefs_category_accounts">Računi</string>
+ <string name="prefs_add_account">Dodaj račun</string>
+ <string name="auth_redirect_non_secure_connection_title">Varna povezava je preusmerjena preko ne-varne poti.</string>
</resources>
<string name="common_remove">Hiq</string>
<string name="activity_chooser_send_file_title">Dërgo</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Llogarit</string>
</resources>
<string name="conflict_keep_both">Zadrži oboje</string>
<string name="activity_chooser_send_file_title">Pošalji</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Nalozi</string>
</resources>
<string name="conflict_title">Ажурирај сукоб</string>
<string name="activity_chooser_send_file_title">Пошаљи</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Налози</string>
</resources>
<string name="network_error_connect_timeout_exception">Ett fel uppstod i väntan på servern, operationen kunde inte ha gjorts</string>
<string name="network_host_not_available">Åtgärden kunte inte slutföras, servern är ej tillgänglig</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Konton</string>
</resources>
<string name="ssl_validator_btn_details_see">விவரங்கள்</string>
<string name="activity_chooser_send_file_title">அனுப்பவும்</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">கணக்குகள்</string>
</resources>
<string name="conflict_overwrite">மேலெழுதல்</string>
<string name="conflict_dont_upload">பதிவேற்ற வேண்டாம்</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">கணக்குகள்</string>
</resources>
<string name="conflict_dont_upload">ไม่ต้องอัพโหลด</string>
<string name="activity_chooser_send_file_title">ส่ง</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">บัญชี</string>
</resources>
<string name="forbidden_permissions_create">Dosya oluşturma</string>
<string name="uploader_upload_forbidden_permissions">Bu klasöre yükleme</string>
<string name="downloader_download_file_not_found">Bu dosya artık sunucuda mevcut değil</string>
+ <string name="prefs_category_accounts">Hesaplar</string>
+ <string name="prefs_add_account">Hesap ekle</string>
+ <string name="auth_redirect_non_secure_connection_title">Güvenli bağlantı, güvenli olmayan bir rotaya yönlendiriliyor.</string>
</resources>
<string name="common_remove">چىقىرىۋەت</string>
<string name="activity_chooser_send_file_title">يوللا</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">ھېساباتلار</string>
</resources>
<string name="activity_chooser_send_file_title">Надіслати</string>
<string name="clipboard_text_copied">Скопійовано в буфер обміну</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Облікові записи</string>
</resources>
<string name="unshare_link_file_error">Một lỗi đã xảy ra khi thử gỡ chia sẻ file hoặc thư mục này</string>
<string name="activity_chooser_send_file_title">Gởi</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">Tài khoản</string>
</resources>
<string name="network_error_connect_timeout_exception">等待服务器响应时发生了一个错误,此操作无法完成</string>
<string name="network_host_not_available">服务器不可用,此操作无法完成</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">账号</string>
</resources>
<string name="activity_chooser_send_file_title">傳送</string>
<string name="copy_link">複製連結</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">帳號</string>
</resources>
<string name="network_error_connect_timeout_exception">在等待伺服器回應時發生了錯誤, 這個操作將無法被完成</string>
<string name="network_host_not_available">這個操作無法完成, 無法使用伺服器</string>
<string name="empty"></string>
+ <string name="prefs_category_accounts">帳號</string>
</resources>
<string name="uploader_upload_forbidden_permissions">to upload in this folder</string>
<string name="downloader_download_file_not_found">The file is no longer available on the server</string>
- <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected through a non secure route.</string>
+ <string name="prefs_category_accounts">Accounts</string>
+ <string name="prefs_add_account">Add account</string>
+ <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected through an unsecured route.</string>
</resources>
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
- <PreferenceCategory android:title="@string/prefs_category_general">
+ <PreferenceCategory android:title="@string/prefs_category_accounts" android:key="accounts_category">
+ </PreferenceCategory>
+ <PreferenceCategory android:title="@string/prefs_category_general">
<!-- ListPreference
android:key="select_oc_account"
android:title="@string/prefs_select_oc_account"
android:summary="@string/prefs_summary_select_oc_account"
/ -->
- <com.owncloud.android.ui.PreferenceMultiline android:title="@string/prefs_manage_accounts" android:key="manage_account" />
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:title="@string/prefs_pincode" android:key="set_pincode"
android:summary="@string/prefs_pincode_summary"/>
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:key="instant_uploading"
--- /dev/null
+package com.owncloud.android.ui;
+
+import android.content.Context;
+import android.preference.CheckBoxPreference;
+import android.view.View;
+
+public class LongClickableCheckBoxPreference extends CheckBoxPreference implements View.OnLongClickListener {
+
+ public LongClickableCheckBoxPreference(Context context) {
+ super(context);
+ }
+
+ @Override
+ public boolean onLongClick(View v) {
+ return true;
+ }
+}
+++ /dev/null
-/* ownCloud Android client application
- * Copyright (C) 2014 ownCloud Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.ui;
-
-import android.content.Context;
-import android.preference.Preference;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.TextView;
-
-/**
- * Allow multiline titles in preferences
- *
- * @author masensio
- *
- */
-public class PreferenceMultiline extends Preference {
-
- public PreferenceMultiline(Context context) {
- super(context);
- }
-
- public PreferenceMultiline(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- public PreferenceMultiline(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- }
-
- @Override
- protected void onBindView(View view) {
- super.onBindView(view);
- TextView titleView = (TextView) view.findViewById(android.R.id.title);
- titleView.setSingleLine(false);
- titleView.setMaxLines(3);
- }
-}
+++ /dev/null
-/* ownCloud Android client application
- * Copyright (C) 2012 Bartek Przybylski
- * Copyright (C) 2012-2013 ownCloud Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.ui.activity;
-
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.accounts.AccountManagerCallback;
-import android.accounts.AccountManagerFuture;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.os.Handler;
-import android.view.ContextMenu;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.widget.AdapterView.AdapterContextMenuInfo;
-import android.widget.CheckedTextView;
-import android.widget.ListView;
-import android.widget.SimpleAdapter;
-import android.widget.TextView;
-
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.SherlockListActivity;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
-import com.owncloud.android.authentication.AuthenticatorActivity;
-import com.owncloud.android.authentication.AccountUtils;
-import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
-import com.owncloud.android.utils.DisplayUtils;
-import com.owncloud.android.utils.Log_OC;
-import com.owncloud.android.MainApp;
-import com.owncloud.android.R;
-
-
-public class AccountSelectActivity extends SherlockListActivity implements
- AccountManagerCallback<Boolean> {
-
- private static final String TAG = "AccountSelectActivity";
-
- private static final String PREVIOUS_ACCOUNT_KEY = "ACCOUNT";
-
- private final Handler mHandler = new Handler();
- private Account mPreviousAccount = null;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- if (savedInstanceState != null) {
- mPreviousAccount = savedInstanceState.getParcelable(PREVIOUS_ACCOUNT_KEY);
- } else {
- mPreviousAccount = AccountUtils.getCurrentOwnCloudAccount(this);
- }
-
- ActionBar actionBar = getSupportActionBar();
- actionBar.setIcon(DisplayUtils.getSeasonalIconId());
- actionBar.setDisplayShowTitleEnabled(true);
- actionBar.setDisplayHomeAsUpEnabled(false);
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- populateAccountList();
- }
-
- @Override
- protected void onPause() {
- if (this.isFinishing()) {
- Account current = AccountUtils.getCurrentOwnCloudAccount(this);
- if ((mPreviousAccount == null && current != null) ||
- (mPreviousAccount != null && !mPreviousAccount.equals(current))) {
- /// the account set as default changed since this activity was created
-
- // restart the main activity
- Intent i = new Intent(this, FileDisplayActivity.class);
- i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(i);
- }
- }
- super.onPause();
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- // Show Create Account if Multiaccount is enabled
- if (getResources().getBoolean(R.bool.multiaccount_support)) {
- MenuInflater inflater = getSherlock().getMenuInflater();
- inflater.inflate(R.menu.account_picker, menu);
- }
- return true;
- }
-
- @Override
- public void onCreateContextMenu(ContextMenu menu, View v,
- ContextMenuInfo menuInfo) {
- getMenuInflater().inflate(R.menu.account_picker_long_click, menu);
- super.onCreateContextMenu(menu, v, menuInfo);
- }
-
- @Override
- protected void onListItemClick(ListView l, View v, int position, long id) {
- String accountName = ((TextView) v.findViewById(android.R.id.text1))
- .getText().toString();
- AccountUtils.setCurrentOwnCloudAccount(this, accountName);
- finish(); // immediate exit
- }
-
- @Override
- public boolean onMenuItemSelected(int featureId, MenuItem item) {
- if (item.getItemId() == R.id.createAccount) {
- /*Intent intent = new Intent(
- android.provider.Settings.ACTION_ADD_ACCOUNT);
- intent.putExtra("authorities",
- new String[] { MainApp.getAuthTokenType() });
- startActivity(intent);*/
- AccountManager am = AccountManager.get(getApplicationContext());
- am.addAccount(MainApp.getAccountType(),
- null,
- null,
- null,
- this,
- null,
- null);
- return true;
- }
- return false;
- }
-
- /**
- * Called when the user clicked on an item into the context menu created at
- * {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} for every
- * ownCloud {@link Account} , containing 'secondary actions' for them.
- *
- * {@inheritDoc}}
- */
- @SuppressWarnings("unchecked")
- @Override
- public boolean onContextItemSelected(android.view.MenuItem item) {
- AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
- int index = info.position;
- HashMap<String, String> map = null;
- try {
- map = (HashMap<String, String>) getListAdapter().getItem(index);
- } catch (ClassCastException e) {
- Log_OC.wtf(TAG, "getitem(index) from list adapter did not return hashmap, bailing out");
- return false;
- }
-
- String accountName = map.get("NAME");
- AccountManager am = (AccountManager) getSystemService(ACCOUNT_SERVICE);
- Account accounts[] = am.getAccountsByType(MainApp.getAccountType());
- for (Account a : accounts) {
- if (a.name.equals(accountName)) {
- if (item.getItemId() == R.id.change_password) {
- Intent updateAccountCredentials = new Intent(this, AuthenticatorActivity.class);
- updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACCOUNT, a);
- updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACTION, AuthenticatorActivity.ACTION_UPDATE_TOKEN);
- startActivity(updateAccountCredentials);
-
- } else if (item.getItemId() == R.id.delete_account) {
- am.removeAccount(a, this, mHandler);
- }
- }
- }
-
- return true;
- }
-
- private void populateAccountList() {
- AccountManager am = (AccountManager) getSystemService(ACCOUNT_SERVICE);
- Account accounts[] = am
- .getAccountsByType(MainApp.getAccountType());
- if (am.getAccountsByType(MainApp.getAccountType()).length == 0) {
- // Show create account screen if there isn't any account
- am.addAccount(MainApp.getAccountType(),
- null,
- null,
- null,
- this,
- null,
- null);
- }
- else {
- LinkedList<HashMap<String, String>> ll = new LinkedList<HashMap<String, String>>();
- for (Account a : accounts) {
- HashMap<String, String> h = new HashMap<String, String>();
- h.put("NAME", a.name);
- h.put("VER",
- "ownCloud version: "
- + am.getUserData(a,
- Constants.KEY_OC_VERSION));
- ll.add(h);
- }
-
- setListAdapter(new AccountCheckedSimpleAdepter(this, ll,
- android.R.layout.simple_list_item_single_choice,
- new String[] { "NAME" }, new int[] { android.R.id.text1 }));
- registerForContextMenu(getListView());
- }
- }
-
- @Override
- public void run(AccountManagerFuture<Boolean> future) {
- if (future.isDone()) {
- Account a = AccountUtils.getCurrentOwnCloudAccount(this);
- String accountName = "";
- if (a == null) {
- Account[] accounts = AccountManager.get(this)
- .getAccountsByType(MainApp.getAccountType());
- if (accounts.length != 0)
- accountName = accounts[0].name;
- AccountUtils.setCurrentOwnCloudAccount(this, accountName);
- }
- populateAccountList();
- }
- }
-
- private class AccountCheckedSimpleAdepter extends SimpleAdapter {
- private Account mCurrentAccount;
- private List<? extends Map<String, ?>> mPrivateData;
-
- public AccountCheckedSimpleAdepter(Context context,
- List<? extends Map<String, ?>> data, int resource,
- String[] from, int[] to) {
- super(context, data, resource, from, to);
- mCurrentAccount = AccountUtils
- .getCurrentOwnCloudAccount(AccountSelectActivity.this);
- mPrivateData = data;
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- View v = super.getView(position, convertView, parent);
- CheckedTextView ctv = (CheckedTextView) v
- .findViewById(android.R.id.text1);
- if (mPrivateData.get(position).get("NAME")
- .equals(mCurrentAccount.name)) {
- ctv.setChecked(true);
- }
- return v;
- }
-
- }
-
-}
package com.owncloud.android.ui.activity;
import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.accounts.AccountManagerCallback;
+import android.accounts.AccountManagerFuture;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
+import android.os.Handler;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceCategory;
import android.preference.PreferenceManager;
+import android.view.ContextMenu;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemLongClickListener;
+import android.widget.ListAdapter;
+import android.widget.ListView;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockPreferenceActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
+import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
+import com.owncloud.android.authentication.AuthenticatorActivity;
import com.owncloud.android.db.DbHandler;
+import com.owncloud.android.ui.LongClickableCheckBoxPreference;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
* @author Bartek Przybylski
* @author David A. Velasco
*/
-public class Preferences extends SherlockPreferenceActivity {
+public class Preferences extends SherlockPreferenceActivity implements AccountManagerCallback<Boolean> {
private static final String TAG = "OwnCloudPreferences";
+
+ private static final String PREVIOUS_ACCOUNT_KEY = "ACCOUNT";
+
private DbHandler mDbHandler;
private CheckBoxPreference pCode;
//private CheckBoxPreference pLogging;
//private Preference pLoggingHistory;
private Preference pAboutApp;
+ private Account mPreviousAccount = null;
+ private PreferenceCategory mAccountsPrefCategory = null;
+ private final Handler mHandler = new Handler();
+ private String mAccountName;
+ private boolean mShowContextMenu = false;
+
@SuppressWarnings("deprecation")
@Override
super.onCreate(savedInstanceState);
mDbHandler = new DbHandler(getBaseContext());
addPreferencesFromResource(R.xml.preferences);
- //populateAccountList();
+
ActionBar actionBar = getSherlock().getActionBar();
actionBar.setIcon(DisplayUtils.getSeasonalIconId());
actionBar.setDisplayHomeAsUpEnabled(true);
- Preference p = findPreference("manage_account");
- if (p != null)
- p.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ if (savedInstanceState != null) {
+ mPreviousAccount = savedInstanceState.getParcelable(PREVIOUS_ACCOUNT_KEY);
+ } else {
+ mPreviousAccount = AccountUtils.getCurrentOwnCloudAccount(this);
+ }
+
+ // Load the accounts category for adding the list of accounts
+ mAccountsPrefCategory = (PreferenceCategory) findPreference("accounts_category");
+
+ ListView listView = getListView();
+ listView.setOnItemLongClickListener(new OnItemLongClickListener() {
@Override
- public boolean onPreferenceClick(Preference preference) {
- Intent i = new Intent(getApplicationContext(), AccountSelectActivity.class);
- startActivity(i);
- return true;
+ public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
+ ListView listView = (ListView) parent;
+ ListAdapter listAdapter = listView.getAdapter();
+ Object obj = listAdapter.getItem(position);
+
+ if (obj != null && obj instanceof LongClickableCheckBoxPreference) {
+ mShowContextMenu = true;
+ mAccountName = obj.toString();
+
+ Preferences.this.openContextMenu(listView);
+
+ View.OnLongClickListener longListener = (View.OnLongClickListener) obj;
+ return longListener.onLongClick(view);
+ }
+ return false;
}
});
-
+
+ // Register context menu for list of preferences.
+ registerForContextMenu(getListView());
+
pCode = (CheckBoxPreference) findPreference("set_pincode");
if (pCode != null){
pCode.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
});
}
-
-
PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("more");
}
@Override
+ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
+
+ // Filter for only showing contextual menu when long press on the
+ // accounts
+ if (mShowContextMenu) {
+ getMenuInflater().inflate(R.menu.account_picker_long_click, menu);
+ mShowContextMenu = false;
+ }
+ super.onCreateContextMenu(menu, v, menuInfo);
+ }
+
+ /**
+ * Called when the user clicked on an item into the context menu created at
+ * {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} for
+ * every ownCloud {@link Account} , containing 'secondary actions' for them.
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean onContextItemSelected(android.view.MenuItem item) {
+ AccountManager am = (AccountManager) getSystemService(ACCOUNT_SERVICE);
+ Account accounts[] = am.getAccountsByType(MainApp.getAccountType());
+ for (Account a : accounts) {
+ if (a.name.equals(mAccountName)) {
+ if (item.getItemId() == R.id.change_password) {
+
+ // Change account password
+ Intent updateAccountCredentials = new Intent(this, AuthenticatorActivity.class);
+ updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACCOUNT, a);
+ updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACTION,
+ AuthenticatorActivity.ACTION_UPDATE_TOKEN);
+ startActivity(updateAccountCredentials);
+
+ } else if (item.getItemId() == R.id.delete_account) {
+
+ // Remove account
+ am.removeAccount(a, this, mHandler);
+ }
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public void run(AccountManagerFuture<Boolean> future) {
+ if (future.isDone()) {
+ Account a = AccountUtils.getCurrentOwnCloudAccount(this);
+ String accountName = "";
+ if (a == null) {
+ Account[] accounts = AccountManager.get(this).getAccountsByType(MainApp.getAccountType());
+ if (accounts.length != 0)
+ accountName = accounts[0].name;
+ AccountUtils.setCurrentOwnCloudAccount(this, accountName);
+ }
+ addAccountsCheckboxPreferences();
+ }
+ }
+
+ @Override
protected void onResume() {
super.onResume();
SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
boolean state = appPrefs.getBoolean("set_pincode", false);
pCode.setChecked(state);
+
+ // Populate the accounts category with the list of accounts
+ addAccountsCheckboxPreferences();
}
@Override
mDbHandler.close();
super.onDestroy();
}
-
+
+ /**
+ * Create the list of accounts that has been added into the app
+ */
+ @SuppressWarnings("deprecation")
+ private void addAccountsCheckboxPreferences() {
+
+ // Remove accounts in case list is refreshing for avoiding to have
+ // duplicate items
+ if (mAccountsPrefCategory.getPreferenceCount() > 0) {
+ mAccountsPrefCategory.removeAll();
+ }
+
+ AccountManager am = (AccountManager) getSystemService(ACCOUNT_SERVICE);
+ Account accounts[] = am.getAccountsByType(MainApp.getAccountType());
+ Account currentAccount = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext());
+
+ if (am.getAccountsByType(MainApp.getAccountType()).length == 0) {
+ // Show create account screen if there isn't any account
+ am.addAccount(MainApp.getAccountType(), null, null, null, this,
+ null,
+ null);
+ }
+ else {
+
+ for (Account a : accounts) {
+ LongClickableCheckBoxPreference accountPreference = new LongClickableCheckBoxPreference(this);
+ accountPreference.setKey(a.name);
+ accountPreference.setTitle(a.name);
+ mAccountsPrefCategory.addPreference(accountPreference);
+
+ // Check the current account that is being used
+ if (a.name.equals(currentAccount.name)) {
+ accountPreference.setChecked(true);
+ } else {
+ accountPreference.setChecked(false);
+ }
+
+ accountPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ String key = preference.getKey();
+ AccountManager am = (AccountManager) getSystemService(ACCOUNT_SERVICE);
+ Account accounts[] = am.getAccountsByType(MainApp.getAccountType());
+ for (Account a : accounts) {
+ CheckBoxPreference p = (CheckBoxPreference) findPreference(a.name);
+ if (key.equals(a.name)) {
+ p.setChecked(true);
+ AccountUtils.setCurrentOwnCloudAccount(getApplicationContext(), a.name);
+ } else {
+ p.setChecked(false);
+ }
+ }
+ return (Boolean) newValue;
+ }
+ });
+
+ }
+
+ // Add Create Account preference at the end of account list if
+ // Multiaccount is enabled
+ if (getResources().getBoolean(R.bool.multiaccount_support)) {
+ createAddAccountPreference();
+ }
+
+ }
+ }
+
+ /**
+ * Create the preference for allow adding new accounts
+ */
+ private void createAddAccountPreference() {
+ Preference addAccountPref = new Preference(this);
+ addAccountPref.setKey("add_account");
+ addAccountPref.setTitle(getString(R.string.prefs_add_account));
+ mAccountsPrefCategory.addPreference(addAccountPref);
+
+ addAccountPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ AccountManager am = AccountManager.get(getApplicationContext());
+ am.addAccount(MainApp.getAccountType(), null, null, null, Preferences.this, null, null);
+ return true;
+ }
+ });
+
+ }
+
+ @Override
+ protected void onPause() {
+ if (this.isFinishing()) {
+ Account current = AccountUtils.getCurrentOwnCloudAccount(this);
+ if ((mPreviousAccount == null && current != null)
+ || (mPreviousAccount != null && !mPreviousAccount.equals(current))) {
+ // the account set as default changed since this activity was
+ // created
+
+ // restart the main activity
+ Intent i = new Intent(this, FileDisplayActivity.class);
+ i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ startActivity(i);
+ }
+ }
+ super.onPause();
+ }
+
}