Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.reddit;
- import im.goel.jreddit.user.User;
- import android.app.Activity;
- import android.os.Bundle;
- import android.view.Menu;
- import android.view.View;
- import android.widget.Button;
- import android.widget.EditText;
- import android.widget.TextView;
- public class MainActivity extends Activity {
- private TextView username;
- private TextView password;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- username = (EditText) findViewById(R.id.username);
- password = (EditText) findViewById(R.id.password);
- }
- public void onClickBtn(View v)
- {
- String usern = username.getText().toString();
- String passw = password.getText().toString();
- User user = new User(usern, passw);
- try {
- user.connect();
- System.out.println("sldkfj");
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- // Inflate the menu; this adds items to the action bar if it is present.
- getMenuInflater().inflate(R.menu.main, menu);
- return true;
- }
- }
Add Comment
Please, Sign In to add comment