Skip to content

Commit

Permalink
[SPARK-17124] Implementation of Messaging feature in Android KitchenSink
Browse files Browse the repository at this point in the history
  • Loading branch information
xionxiao committed Jul 12, 2018
1 parent 37dcac1 commit a55df7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AddCallHistoryAction(String email, String direction) {
history = new CallHistory();
history.setEmail(email);
history.setDirection(direction);
history.setData(new Date());
history.setDate(new Date());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ public PeopleFragment() {
persons = new ArrayList<>();
}

public final static boolean isValidEmail(CharSequence target) {
return !TextUtils.isEmpty(target) && android.util.Patterns.EMAIL_ADDRESS.matcher(target).matches();
}


@OnItemClick(R.id.people_list)
public void peopleListItemClicked(int position) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import android.app.FragmentTransaction;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -54,6 +55,10 @@ public BaseFragment() {
// Required empty public constructor
}

public String getName() {
return this.getClass().getSimpleName();
}

/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
Expand Down Expand Up @@ -141,6 +146,10 @@ public void toast(String message) {
Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show();
}

public static boolean isValidEmail(CharSequence target) {
return !TextUtils.isEmpty(target) && android.util.Patterns.EMAIL_ADDRESS.matcher(target).matches();
}

/* Only use for debug */
@SuppressWarnings("unused")
@Subscribe
Expand Down

0 comments on commit a55df7f

Please sign in to comment.