Android Open Source - class_board_app Script Activity






From Project

Back to project page class_board_app.

License

The source code is released under:

GNU General Public License

If you think the Android project class_board_app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.parse.starter;
/*  ww  w  .  j a va  2 s .c  o m*/
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.parse.ParseObject;
import com.parse.ParseUser;

public class ScriptActivity extends Activity {
  Button b1;
  EditText t1;
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.coms);
    b1=(Button)(findViewById(R.id.but1));
    t1= (EditText)(findViewById(R.id.edt1));
    b1.setOnClickListener(new Button.OnClickListener(){

      @Override
      public void onClick(View v) {
        // TODO Auto-generated method stub
        if(t1.getText().toString()=="")
        {
          Toast.makeText(getApplicationContext(), "Enter some commands", Toast.LENGTH_LONG).show();
        }
        else
        { ParseObject command=new ParseObject("Command");
        command.put("string",t1.getText().toString());
        command.put("sender",ParseUser.getCurrentUser().getUsername());
        command.saveInBackground();
          Toast.makeText(getApplicationContext(), "Performing!!!", Toast.LENGTH_LONG).show();
          finish();
        }
      }
      
    });
  }

}




Java Source Code List

com.parse.starter.CustomAdapter.java
com.parse.starter.Datamodel.java
com.parse.starter.GroupActivity.java
com.parse.starter.LoginActivity.java
com.parse.starter.NewPostActivity.java
com.parse.starter.ParseApplication.java
com.parse.starter.PostListActivity.java
com.parse.starter.Post.java
com.parse.starter.RouteActivity.java
com.parse.starter.ScriptActivity.java
com.parse.starter.SignUpActivity.java
com.parse.starter.SignUpOrLogInActivity.java