|
@@ -1,5 +1,27 @@
|
|
|
+/**
|
|
|
+ * Nextcloud Android client application
|
|
|
+ *
|
|
|
+ * @author Andy Scherzinger
|
|
|
+ * @author Tobias Kaminsky
|
|
|
+ * Copyright (C) 2016 Andy Scherzinger
|
|
|
+ * Copyright (C) 2016 Nextcloud
|
|
|
+ *
|
|
|
+ * This program is free software; you can redistribute it and/or
|
|
|
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
|
|
+ * License as published by the Free Software Foundation; either
|
|
|
+ * version 3 of the License, or any later version.
|
|
|
+ *
|
|
|
+ * 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 AFFERO GENERAL PUBLIC LICENSE for more details.
|
|
|
+ *
|
|
|
+ * You should have received a copy of the GNU Affero General Public
|
|
|
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
+ */
|
|
|
package com.owncloud.android.ui.activity;
|
|
|
|
|
|
+import android.content.Intent;
|
|
|
import android.os.Bundle;
|
|
|
import android.text.Html;
|
|
|
import android.text.method.LinkMovementMethod;
|
|
@@ -9,7 +31,7 @@ import android.widget.TextView;
|
|
|
import com.owncloud.android.R;
|
|
|
|
|
|
/**
|
|
|
- * Created by tobi on 03.09.16.
|
|
|
+ * Activity providing information about ways to participate in the app's development.
|
|
|
*/
|
|
|
public class ParticipateActivity extends FileActivity {
|
|
|
|
|
@@ -24,9 +46,12 @@ public class ParticipateActivity extends FileActivity {
|
|
|
|
|
|
// setup drawer
|
|
|
setupDrawer(R.id.nav_participate);
|
|
|
-
|
|
|
getSupportActionBar().setTitle(getString(R.string.actionbar_participate));
|
|
|
|
|
|
+ setupContent();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setupContent() {
|
|
|
TextView betaView = (TextView) findViewById(R.id.participate_betaView);
|
|
|
if (betaView != null) {
|
|
|
betaView.setMovementMethod(LinkMovementMethod.getInstance());
|
|
@@ -62,14 +87,28 @@ public class ParticipateActivity extends FileActivity {
|
|
|
|
|
|
@Override
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
- if (item.getItemId() == android.R.id.home) {
|
|
|
+ boolean retval;
|
|
|
+ switch (item.getItemId()) {
|
|
|
+ case android.R.id.home: {
|
|
|
if (isDrawerOpen()) {
|
|
|
closeDrawer();
|
|
|
} else {
|
|
|
openDrawer();
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ default:
|
|
|
+ retval = super.onOptionsItemSelected(item);
|
|
|
}
|
|
|
+ return retval;
|
|
|
+ }
|
|
|
|
|
|
- return true;
|
|
|
+ @Override
|
|
|
+ public void showFiles(boolean onDeviceOnly) {
|
|
|
+ super.showFiles(onDeviceOnly);
|
|
|
+ Intent fileDisplayActivity = new Intent(getApplicationContext(),
|
|
|
+ FileDisplayActivity.class);
|
|
|
+ fileDisplayActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
|
|
+ startActivity(fileDisplayActivity);
|
|
|
}
|
|
|
}
|