android-openrat

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 6a0e7a751b305135de29c4a46b2c31982626b8dc
parent 13745a9f0b186d176c92b6a64c632f5503793a72
Author: dankert <devnull@localhost>
Date:   Sun, 16 Oct 2011 00:28:28 +0200

Lizenz ergänzt.

Diffstat:
src/de/openrat/android/blog/OpenRatBlog.java | 37++++++++++++++++++++++++++++++-------
1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/src/de/openrat/android/blog/OpenRatBlog.java b/src/de/openrat/android/blog/OpenRatBlog.java @@ -1,3 +1,21 @@ +/* + * Openrat CMS-Client for Android + * + * Copyright (C) 2011 Jan Dankert + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) 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 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 de.openrat.android.blog; import java.io.IOException; @@ -18,6 +36,9 @@ import android.view.View.OnClickListener; import android.widget.TextView; import de.openrat.android.blog.client.CMSRequest; +/** + * @author Jan Dankert + */ public class OpenRatBlog extends Activity { private static final String PREFS_NAME = "OR_BLOG_PREFS"; @@ -42,12 +63,14 @@ public class OpenRatBlog extends Activity request.setParameter("action", "index"); request.setParameter("subaction", "login"); request.setParameter("dbid", "db1"); - request.setParameter("login_name", prefs.getString("username","")); - request.setParameter("login_password", prefs.getString("password","")); + request.setParameter("login_name", prefs.getString("username", "")); + request.setParameter("login_password", prefs.getString("password", "")); String response = null; try { - ProgressDialog dialog = ProgressDialog.show(OpenRatBlog.this,getResources().getString(R.string.loading),getResources().getString(R.string.waiting)); + ProgressDialog dialog = ProgressDialog.show(OpenRatBlog.this, + getResources().getString(R.string.loading), getResources() + .getString(R.string.waiting)); response = request.performRequest(); dialog.dismiss(); @@ -77,15 +100,15 @@ public class OpenRatBlog extends Activity tv.setText(msgText + "\nSitzung '" + sessionName + "': " + sessionId + "\nAusgabe: " + response); - View connect = findViewById(R.id.connect); - connect.setOnClickListener( new OnClickListener() + connect.setOnClickListener(new OnClickListener() { - + @Override public void onClick(View v) { - Intent intent = new Intent(v.getContext(),ProjectActivity.class); + Intent intent = new Intent(v.getContext(), + ProjectActivity.class); intent.putExtra(ProjectActivity.CLIENT, request); startActivity(intent); }