From 243e38a5e3801e3d3cdc9bde219642dfba97c4b4 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sun, 25 Apr 2010 15:27:55 +0200 Subject: [PATCH] Added MessageActivity to show single messages and with options --- AndroidManifest.xml | 4 ++ res/layout/message.xml | 40 ++++++++++++++++ src/org/yaaic/activity/MessageActivity.java | 53 +++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 res/layout/message.xml create mode 100644 src/org/yaaic/activity/MessageActivity.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 0c92b93..4d1b457 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -76,6 +76,10 @@ along with Yaaic. If not, see . android:name=".activity.AddCommandsActivity" android:theme="@android:style/Theme.Dialog"> + + diff --git a/res/layout/message.xml b/res/layout/message.xml new file mode 100644 index 0000000..2553500 --- /dev/null +++ b/res/layout/message.xml @@ -0,0 +1,40 @@ + + + + + + + \ No newline at end of file diff --git a/src/org/yaaic/activity/MessageActivity.java b/src/org/yaaic/activity/MessageActivity.java new file mode 100644 index 0000000..a2614b8 --- /dev/null +++ b/src/org/yaaic/activity/MessageActivity.java @@ -0,0 +1,53 @@ +/* +Yaaic - Yet Another Android IRC Client + +Copyright 2009-2010 Sebastian Kaspari + +This file is part of Yaaic. + +Yaaic 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. + +Yaaic 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 Yaaic. If not, see . +*/ +package org.yaaic.activity; + +import org.yaaic.R; +import org.yaaic.model.Extra; + +import android.app.Activity; +import android.os.Bundle; +import android.view.Window; +import android.widget.TextView; + +/** + * Activity for single message view + * + * @author Sebastian Kaspari + */ +public class MessageActivity extends Activity +{ + /** + * On create + */ + @Override + public void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + + requestWindowFeature(Window.FEATURE_NO_TITLE); + setContentView(R.layout.message); + + ((TextView) findViewById(R.id.message)).setText( + getIntent().getExtras().getString(Extra.MESSAGE) + ); + } +}