<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="main_files">Files</string>
- <string name="main_music">Music</string>
- <string name="main_contacts">Contacts</string>
- <string name="main_calendar">Calendar</string>
- <string name="main_bookmarks">Bookmarks</string>
- <string name="main_settings">Settings</string>
- <string name="main_tit_accsetup">Setup Account</string>
- <string name="main_wrn_accsetup">There is no account set up on your device. In order to use this App, you need to create one.</string>
<string name="about_android">%1$s Android App</string>
<string name="about_version">version %1$s</string>
<string name="actionbar_sync">Refresh account</string>
<string name="auth_trying_to_login">Trying to login…</string>
<string name="auth_no_net_conn_title">No network connection</string>
- <string name="auth_connect_anyway">Connect anyway</string-->
<string name="auth_nossl_plain_ok_title">Secure connection unavailable.</string>
<string name="auth_connection_established">Connection established</string>
<string name="auth_testing_connection">Testing connection…</string>
<string name="oauth_check_onoff">Login with oAuth2.</string>
<string name="oauth_login_connection">Connecting to oAuth2 server…</string>
- <string name="ssl_validator_title">Warning</string -->
<string name="ssl_validator_header">The identity of the site could not be verified</string>
<string name="ssl_validator_reason_cert_not_trusted">- The server certificate is not trusted</string>
<string name="ssl_validator_reason_cert_expired">- The server certificate expired</string>
+++ /dev/null
-/* ownCloud Android client application\r
- * Copyright (C) 2011 Bartek Przybylski\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License version 2,\r
- * as published by the Free Software Foundation.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- *\r
- */\r
-package com.owncloud.android.ui.activity;\r
-\r
-import com.actionbarsherlock.app.SherlockFragmentActivity;\r
-import com.owncloud.android.ui.adapter.LandingScreenAdapter;\r
-\r
-import android.accounts.Account;\r
-import android.accounts.AccountManager;\r
-import android.app.AlertDialog;\r
-import android.app.Dialog;\r
-import android.content.DialogInterface;\r
-import android.content.DialogInterface.OnClickListener;\r
-import android.content.Intent;\r
-import android.os.Bundle;\r
-import android.view.View;\r
-import android.widget.AdapterView;\r
-import android.widget.AdapterView.OnItemClickListener;\r
-import android.widget.GridView;\r
-import android.widget.Toast;\r
-\r
-import com.owncloud.android.MainApp;\r
-import com.owncloud.android.R;\r
-\r
-/**\r
- * This activity is used as a landing page when the user first opens this app.\r
- * \r
- * @author Lennart Rosam\r
- * \r
- */\r
-public class LandingActivity extends SherlockFragmentActivity implements\r
- OnClickListener, OnItemClickListener {\r
-\r
- public static final int DIALOG_SETUP_ACCOUNT = 1;\r
-\r
- @Override\r
- protected void onCreate(Bundle savedInstanceState) {\r
- super.onCreate(savedInstanceState);\r
- setContentView(R.layout.main);\r
-\r
- // Fill the grid view of the landing screen with icons\r
- GridView landingScreenItems = (GridView) findViewById(R.id.homeScreenGrid);\r
- landingScreenItems.setAdapter(new LandingScreenAdapter(this));\r
- landingScreenItems.setOnItemClickListener(this);\r
-\r
- // Check, if there are ownCloud accounts\r
- if (!accountsAreSetup()) {\r
- showDialog(DIALOG_SETUP_ACCOUNT);\r
- } else {\r
- // Start device tracking service\r
- Intent locationServiceIntent = new Intent();\r
- locationServiceIntent\r
- .setAction("com.owncloud.android.location.LocationLauncher");\r
- sendBroadcast(locationServiceIntent);\r
- }\r
-\r
- }\r
-\r
- @Override\r
- protected void onRestart() {\r
- super.onRestart();\r
- // Check, if there are ownCloud accounts\r
- if (!accountsAreSetup()) {\r
- showDialog(DIALOG_SETUP_ACCOUNT);\r
- }\r
- }\r
-\r
- @Override\r
- protected void onRestoreInstanceState(Bundle savedInstanceState) {\r
- super.onRestoreInstanceState(savedInstanceState);\r
- // Check, if there are ownCloud accounts\r
- if (!accountsAreSetup()) {\r
- showDialog(DIALOG_SETUP_ACCOUNT);\r
- }\r
- }\r
-\r
- @Override\r
- protected Dialog onCreateDialog(int id) {\r
- Dialog dialog;\r
- switch (id) {\r
- case DIALOG_SETUP_ACCOUNT:\r
- AlertDialog.Builder builder = new AlertDialog.Builder(this);\r
- builder.setTitle(R.string.main_tit_accsetup);\r
- builder.setMessage(R.string.main_wrn_accsetup);\r
- builder.setCancelable(false);\r
- builder.setPositiveButton(R.string.common_ok, this);\r
- builder.setNegativeButton(R.string.common_cancel, this);\r
- dialog = builder.create();\r
- break;\r
- default:\r
- dialog = null;\r
- }\r
-\r
- return dialog;\r
- }\r
-\r
- public void onClick(DialogInterface dialog, int which) {\r
- // In any case - we won't need it anymore\r
- dialog.dismiss();\r
- switch (which) {\r
- case DialogInterface.BUTTON_POSITIVE:\r
- Intent intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT);\r
- intent.putExtra("authorities",\r
- new String[] { MainApp.getAuthTokenType() });\r
- startActivity(intent);\r
- break;\r
- case DialogInterface.BUTTON_NEGATIVE:\r
- finish();\r
- }\r
-\r
- }\r
-\r
- @Override\r
- /**\r
- * Start an activity based on the selection\r
- * the user made\r
- */\r
- public void onItemClick(AdapterView<?> parent, View view, int position,\r
- long id) {\r
- Intent intent;\r
- intent = (Intent) parent.getAdapter().getItem(position);\r
- if (intent != null) {\r
- startActivity(intent);\r
- } else {\r
- // TODO: Implement all of this and make this text go away ;-)\r
- Toast toast = Toast.makeText(this, "Not yet implemented!",\r
- Toast.LENGTH_SHORT);\r
- toast.show();\r
- }\r
- }\r
-\r
- /**\r
- * Checks, whether or not there are any ownCloud accounts setup.\r
- * \r
- * @return true, if there is at least one account.\r
- */\r
- private boolean accountsAreSetup() {\r
- AccountManager accMan = AccountManager.get(this);\r
- Account[] accounts = accMan\r
- .getAccountsByType(MainApp.getAccountType());\r
- return accounts.length > 0;\r
- }\r
-\r
-}\r
+++ /dev/null
-/* ownCloud Android client application\r
- * Copyright (C) 2011 Bartek Przybylski\r
- * Copyright (C) 2012-2013 ownCloud Inc.\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License version 2,\r
- * as published by the Free Software Foundation.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- *\r
- */\r
-package com.owncloud.android.ui.adapter;\r
-\r
-import com.owncloud.android.authentication.AccountUtils;\r
-import com.owncloud.android.ui.activity.FileDisplayActivity;\r
-import com.owncloud.android.ui.activity.Preferences;\r
-\r
-import android.content.Context;\r
-import android.content.Intent;\r
-import android.view.LayoutInflater;\r
-import android.view.View;\r
-import android.view.ViewGroup;\r
-import android.widget.BaseAdapter;\r
-import android.widget.ImageView;\r
-import android.widget.TextView;\r
-import com.owncloud.android.R;\r
-\r
-/**\r
- * Populates the landing screen icons.\r
- * \r
- * @author Lennart Rosam\r
- * \r
- */\r
-public class LandingScreenAdapter extends BaseAdapter {\r
-\r
- private Context mContext;\r
-\r
- private final Integer[] mLandingScreenIcons = { R.drawable.home,\r
- R.drawable.music, R.drawable.contacts, R.drawable.calendar,\r
- android.R.drawable.ic_menu_agenda, R.drawable.settings };\r
-\r
- private final Integer[] mLandingScreenTexts = { R.string.main_files,\r
- R.string.main_music, R.string.main_contacts,\r
- R.string.main_calendar, R.string.main_bookmarks,\r
- R.string.main_settings };\r
-\r
- public LandingScreenAdapter(Context context) {\r
- mContext = context;\r
- }\r
-\r
- @Override\r
- public int getCount() {\r
- return mLandingScreenIcons.length;\r
- }\r
-\r
- @Override\r
- /**\r
- * Returns the Intent associated with this object\r
- * or null if the functionality is not yet implemented\r
- */\r
- public Object getItem(int position) {\r
- Intent intent = new Intent();\r
-\r
- switch (position) {\r
- case 0:\r
- /*\r
- * The FileDisplayActivity requires the ownCloud account as an\r
- * parcableExtra. We will put in the one that is selected in the\r
- * preferences\r
- */\r
- intent.setClass(mContext, FileDisplayActivity.class);\r
- intent.putExtra("ACCOUNT",\r
- AccountUtils.getCurrentOwnCloudAccount(mContext));\r
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r
- break;\r
- case 5:\r
- intent.setClass(mContext, Preferences.class);\r
- break;\r
- default:\r
- intent = null;\r
- }\r
- return intent;\r
- }\r
-\r
- @Override\r
- public long getItemId(int position) {\r
- return position;\r
- }\r
-\r
- @Override\r
- public View getView(int position, View convertView, ViewGroup parent) {\r
- if (convertView == null) {\r
- LayoutInflater inflator = LayoutInflater.from(mContext);\r
- convertView = inflator.inflate(R.layout.landing_page_item, null);\r
-\r
- ImageView icon = (ImageView) convertView\r
- .findViewById(R.id.gridImage);\r
- TextView iconText = (TextView) convertView\r
- .findViewById(R.id.gridText);\r
-\r
- icon.setImageResource(mLandingScreenIcons[position]);\r
- iconText.setText(mLandingScreenTexts[position]);\r
- }\r
- return convertView;\r
- }\r
-}\r
+++ /dev/null
-/* ownCloud Android client application\r
- * Copyright (C) 2011 Bartek Przybylski\r
- * Copyright (C) 2012-2013 ownCloud Inc.\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License version 2,\r
- * as published by the Free Software Foundation.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- *\r
- */\r
-package com.owncloud.android.ui.fragment;\r
-\r
-import com.actionbarsherlock.app.SherlockFragment;\r
-import com.owncloud.android.ui.activity.LandingActivity;\r
-import com.owncloud.android.ui.adapter.LandingScreenAdapter;\r
-\r
-import android.os.Bundle;\r
-import android.view.LayoutInflater;\r
-import android.view.View;\r
-import android.view.ViewGroup;\r
-import android.widget.ListView;\r
-import com.owncloud.android.R;\r
-\r
-/**\r
- * Used on the Landing page to display what Components of the ownCloud there\r
- * are. Like Files, Music, Contacts, etc.\r
- * \r
- * @author Lennart Rosam\r
- * \r
- */\r
-public class LandingPageFragment extends SherlockFragment {\r
-\r
- @Override\r
- public View onCreateView(LayoutInflater inflater, ViewGroup container,\r
- Bundle savedInstanceState) {\r
- View root = inflater.inflate(R.layout.landing_page_fragment, container);\r
- return root;\r
- }\r
-\r
- @Override\r
- public void onActivityCreated(Bundle savedInstanceState) {\r
- super.onActivityCreated(savedInstanceState);\r
-\r
- ListView landingScreenItems = (ListView) getView().findViewById(\r
- R.id.homeScreenList);\r
- landingScreenItems.setAdapter(new LandingScreenAdapter(getActivity()));\r
- landingScreenItems\r
- .setOnItemClickListener((LandingActivity) getActivity());\r
- }\r
-\r
-}\r