Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.widget.Toast;

public class Main {
    public static boolean isValidPost(String post, Context thisActivtiy) {
        //If no words typed
        if (post.equals("")) {
            Toast.makeText(thisActivtiy, "Please enter in a post.", Toast.LENGTH_SHORT).show();
            return false;
        }
        //The info is not of the right format
        else if (false) {
            Toast.makeText(thisActivtiy, ".", Toast.LENGTH_SHORT).show();
            return false;
        }
        //Filter it and it is bad!
        else if (false) {
            Toast.makeText(thisActivtiy, ".", Toast.LENGTH_SHORT).show();
            return false;
        }
        //Everything is good and the info can be used to create a new account
        else
            return true;
    }
}