2010-03-17 17:43:56 -04:00
|
|
|
/*
|
|
|
|
Yaaic - Yet Another Android IRC Client
|
|
|
|
|
2013-01-21 15:32:43 -05:00
|
|
|
Copyright 2009-2013 Sebastian Kaspari
|
2010-03-17 17:43:56 -04:00
|
|
|
|
|
|
|
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 <http://www.gnu.org/licenses/>.
|
2011-01-25 15:02:27 -05:00
|
|
|
*/
|
2010-03-24 13:48:38 -04:00
|
|
|
package org.yaaic.activity;
|
2010-03-17 17:43:56 -04:00
|
|
|
|
|
|
|
import org.yaaic.R;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.View.OnClickListener;
|
|
|
|
import android.widget.Button;
|
|
|
|
import android.widget.EditText;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Small dialog to show an edittext for joining channels
|
|
|
|
*
|
|
|
|
* @author Sebastian Kaspari <sebastian@yaaic.org>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class JoinActivity extends Activity implements OnClickListener
|
|
|
|
{
|
2010-11-18 12:52:19 -05:00
|
|
|
/**
|
|
|
|
* On create
|
|
|
|
*/
|
2010-03-17 17:43:56 -04:00
|
|
|
@Override
|
|
|
|
public void onCreate(Bundle savedInstanceState)
|
|
|
|
{
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
|
|
|
setContentView(R.layout.join);
|
2011-01-25 15:02:27 -05:00
|
|
|
|
2010-03-17 17:43:56 -04:00
|
|
|
((Button) findViewById(R.id.join)).setOnClickListener(this);
|
2011-04-12 17:05:09 -04:00
|
|
|
|
|
|
|
((EditText) findViewById(R.id.channel)).setSelection(1);
|
2010-03-17 17:43:56 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* On click
|
|
|
|
*/
|
2011-01-25 15:02:27 -05:00
|
|
|
@Override
|
2010-11-18 12:52:19 -05:00
|
|
|
public void onClick(View v)
|
|
|
|
{
|
|
|
|
Intent intent = new Intent();
|
|
|
|
intent.putExtra("channel", ((EditText) findViewById(R.id.channel)).getText().toString());
|
|
|
|
setResult(RESULT_OK, intent);
|
|
|
|
finish();
|
|
|
|
}
|
2010-03-17 17:43:56 -04:00
|
|
|
}
|