Last active
August 29, 2015 14:01
-
-
Save ipcjs/7a5a9100d714cbc7fa25 to your computer and use it in GitHub Desktop.
试一试呀~~
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.logintext; | |
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.text.InputType; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.EditText; | |
import android.widget.Toast; | |
import com.example.logintext.dialog.AgeSetDialog; | |
import com.example.logintext.dialog.LikeMMDialog; | |
import com.example.logintext.dialog.NameSetDialog; | |
import com.example.logintext.dialog.SexChoiceDialog; | |
/**真的大丈夫?*/ | |
public class SignUpActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
// TODO Auto-generated method stub | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_signup); | |
((EditText) findViewById(R.id.sex_set)).setInputType(InputType.TYPE_NULL); | |
((EditText) findViewById(R.id.age_set)).setInputType(InputType.TYPE_NULL); | |
((EditText) findViewById(R.id.name_set)).setInputType(InputType.TYPE_NULL); | |
} | |
@SuppressLint("NewApi") | |
public void toDo(View v){ | |
Toast.makeText(this, "hehe", Toast.LENGTH_SHORT).show(); | |
switch(v.getId()){ | |
case R.id.sex_set: | |
SexChoiceDialog sexChoice = new SexChoiceDialog(); | |
sexChoice.show(getFragmentManager(), "tag"); | |
break; | |
case R.id.age_set: | |
AgeSetDialog a = new AgeSetDialog(); | |
a.show(getFragmentManager(), "tag"); | |
break; | |
case R.id.name_set: | |
NameSetDialog nameSet = new NameSetDialog(); | |
nameSet.show(getFragmentManager(), "tag"); | |
break; | |
case R.id.mm_jpg: | |
LikeMMDialog likemm = new LikeMMDialog(); | |
likemm.show(getFragmentManager(), "tag"); | |
break; | |
case R.id.dialog_signup: | |
break; | |
} | |
} | |
public void toDoName(View view){ | |
Log.i("hehe", "hehe"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment