本文整理汇总了Java中com.rey.material.widget.EditText类的典型用法代码示例。如果您正苦于以下问题:Java EditText类的具体用法?Java EditText怎么用?Java EditText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EditText类属于com.rey.material.widget包,在下文中一共展示了EditText类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.rey.material.widget.EditText; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_feedback);
findViewById(R.id.btnFeedback).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
et_email = (EditText) findViewById(R.id.email);
et_feedback = (EditText) findViewById(R.id.feedbackText);
if (et_email.getText().toString() == "" && et_feedback.getText().toString() == "") {
sendFeedback(et_email.getText().toString(), et_feedback.getText().toString());
toaster("Please select your E-Mail client to send the feedback to me!", Toast.LENGTH_LONG);
} else {
toaster("Fields cannot be empty. Please input the details to send feedback", Toast.LENGTH_LONG);
}
}
});
}
开发者ID:sreecodeslayer,项目名称:Samsaaram,代码行数:22,代码来源:FeedbackActivity.java
示例2: onCreate
import com.rey.material.widget.EditText; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shared_preference);
context = this;
btnColor = (Button) findViewById(R.id.btnColor);
txtHexadecimalColor = (EditText) findViewById(R.id.txtHexadecimalColor);
txtLineThickness = (EditText) findViewById(R.id.txtLineThickness);
txtTitleSelectPictureName = (EditText) findViewById(R.id.txtTitleSelectPictureName);
txtDirectoryName = (EditText) findViewById(R.id.txtDirectoryName);
txtPhotoName = (EditText) findViewById(R.id.txtPhotoName);
switchAutoIncrement = (Switch) findViewById(R.id.switchAutoIncrement);
sliderQuality = (Slider) findViewById(R.id.sliderQuality);
radioTypeExtension = (RadioGroup) findViewById(R.id.radioTypeExtension);
radioExtensionWEBP = (RadioButton) findViewById(R.id.radioExtensionWEBP);
radioExtensionPNG = (RadioButton) findViewById(R.id.radioExtensionPNG);
radioExtensionJPEG = (RadioButton) findViewById(R.id.radioExtensionJPEG);
noteFragment = (TextView) findViewById(R.id.noteFragment);
noteFragment.setVisibility(View.VISIBLE);
valuesSharedPreference();
listeners();
}
开发者ID:fabian7593,项目名称:MagicalCamera,代码行数:23,代码来源:SharedPreferenceActivity.java
示例3: onCreate
import com.rey.material.widget.EditText; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
final EditText emailField = (EditText) findViewById(R.id.email_field);
final EditText passwordField = (EditText) findViewById(R.id.password_field);
final EditText confirmField = (EditText) findViewById(R.id.confirm_field);
com.rey.material.widget.Button registerBtn = (com.rey.material.widget.Button) findViewById(R.id.register_btn);
registerBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(passwordField.getText().toString().length()<8){
new Alert(ctx, getResources().getString(R.string.password_short));
}else if(!passwordField.getText().toString().equals(confirmField.getText().toString())){
new Alert(ctx, getResources().getString(R.string.password_different));
}else {
register(emailField.getText().toString(), passwordField.getText().toString());
}
}
});
}
开发者ID:mywaystar,项目名称:randomail-android,代码行数:27,代码来源:RegisterActivity.java
示例4: onCreateView
import com.rey.material.widget.EditText; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.fragment_device_edit_connection_http, container, false);
progressView = (ProgressView) rootView.findViewById(R.id.connection_progressbar);
btnTest = (Button) rootView.findViewById(R.id.btnTest);
newHost = (EditText) rootView.findViewById(R.id.device_host);
newHost.setText(ioConnection.hostName);
newPort = (EditText) rootView.findViewById(R.id.device_http_port);
if (ioConnection.getDestinationPort() != -1)
newPort.setText(String.valueOf(ioConnection.getDestinationPort()));
connectionStateImage = ((ImageView) rootView.findViewById(R.id.connection_reachable));
connectionStateImage.setVisibility(View.VISIBLE);
connectionStateImage.setImageResource(android.R.drawable.presence_offline);
btnTest.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
closeIfReachable = false;
checkConnectionReachable();
}
});
return rootView;
}
开发者ID:davidgraeff,项目名称:Android-NetPowerctrl,代码行数:26,代码来源:IOConnectionHttpDialog.java
示例5: onCreateView
import com.rey.material.widget.EditText; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.fragment_device_edit_connection_ip, container, false);
progressView = (ProgressView) rootView.findViewById(R.id.connection_progressbar);
btnTest = (Button) rootView.findViewById(R.id.btnTest);
newHost = (EditText) rootView.findViewById(R.id.device_host);
newHost.setText(ioConnection.hostName);
connectionStateImage = ((ImageView) rootView.findViewById(R.id.connection_reachable));
connectionStateImage.setVisibility(View.VISIBLE);
connectionStateImage.setImageResource(android.R.drawable.presence_offline);
btnTest.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
closeIfReachable = false;
checkConnectionReachable();
}
});
return rootView;
}
开发者ID:davidgraeff,项目名称:Android-NetPowerctrl,代码行数:23,代码来源:IOConnectionUDPDialog.java
示例6: onCreate
import com.rey.material.widget.EditText; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_email_settings);
emailField = (EditText) findViewById(R.id.email);
labelField = (EditText) findViewById(R.id.label);
ImageButton reloadBtn = (ImageButton) findViewById(R.id.reload_btn);
reloadBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
geretateRandomString();
}
});
domains = (Spinner) findViewById(R.id.domains);
ArrayList<String> items = new ArrayList<String>();
items.add("@alpha.randomail.net");
if (RandomailApplication.user != null) {
for (String domain : RandomailApplication.user.domains) {
items.add(domain);
}
}
ArrayAdapter<String> adapter = new ArrayAdapter<String>(ctx, android.R.layout.simple_list_item_1, items);
domains.setAdapter(adapter);
com.rey.material.widget.Button createAlias = (com.rey.material.widget.Button) findViewById(R.id.create_alias);
createAlias.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
createAlias();
}
});
}
开发者ID:mywaystar,项目名称:randomail-android,代码行数:38,代码来源:EmailSettingsActivity.java
示例7: onCreateView
import com.rey.material.widget.EditText; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_group_name, container, false);
input = (EditText) view.findViewById(R.id.group_name);
if (group != null) {
input.setText(group.name);
//view.findViewById(R.id.hint).setVisibility(View.GONE);
}
return view;
}
开发者ID:davidgraeff,项目名称:Android-NetPowerctrl,代码行数:12,代码来源:RenameOrCreateDialog.java
注:本文中的com.rey.material.widget.EditText类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论