本文整理匯總了Java中com.rengwuxian.materialedittext.MaterialEditText.setHint方法的典型用法代碼示例。如果您正苦於以下問題:Java MaterialEditText.setHint方法的具體用法?Java MaterialEditText.setHint怎麽用?Java MaterialEditText.setHint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.rengwuxian.materialedittext.MaterialEditText
的用法示例。
在下文中一共展示了MaterialEditText.setHint方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showSearchDialog
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
private void showSearchDialog() {
final MaterialEditText editText = new MaterialEditText(FanjuNewsActivity.this);
editText.setHint(R.string.input_http);
editText.setMetTextColor(Color.parseColor("#009688"));
editText.setPrimaryColor(Color.parseColor("#009688"));
editText.setMaxCharacters(100);
editText.setErrorColor(Color.parseColor("#ff0000"));
AlertDialog.Builder builder = new AlertDialog.Builder(FanjuNewsActivity.this)
.setTitle(R.string.search_video)
.setView(editText, 30, 20, 20, 20)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
doSearch(editText.getText().toString());
}
});
builder.create().show();
}
示例2: showAddDialog
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
private void showAddDialog() {
final MaterialEditText editText = new MaterialEditText(FindBookActivity.this);
editText.setHint(R.string.input_hint);
editText.setMetTextColor(Color.parseColor("#009688"));
editText.setPrimaryColor(Color.parseColor("#009688"));
editText.setMaxCharacters(20);
editText.setErrorColor(Color.parseColor("#ff0000"));
AlertDialog.Builder builder = new AlertDialog.Builder(FindBookActivity.this)
.setTitle(R.string.add_book)
.setView(editText, 30, 20, 20, 20)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
doSearch(editText.getText().toString());
}
});
builder.create().show();
}
示例3: showSearchDialog
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
private void showSearchDialog() {
final MaterialEditText editText = new MaterialEditText(FanjuVideoActivity.this);
editText.setHint(R.string.input_http);
editText.setMetTextColor(Color.parseColor("#009688"));
editText.setPrimaryColor(Color.parseColor("#009688"));
editText.setMaxCharacters(100);
editText.setErrorColor(Color.parseColor("#ff0000"));
AlertDialog.Builder builder = new AlertDialog.Builder(FanjuVideoActivity.this)
.setTitle(R.string.search_video)
.setView(editText, 30, 20, 20, 20)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
doSearch(editText.getText().toString());
}
});
builder.create().show();
}
示例4: setupEditionView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
@Override
public View setupEditionView(Object value)
{
if (value != null)
{
editionValue = value;
}
View vr = inflater.inflate(R.layout.form_usergroup_picker, null);
editText = (MaterialEditText) vr.findViewById(R.id.group_picker);
editText.setText(getHumanReadableEditionValue());
// Asterix if required
editText.setFloatingLabelText(getLabelText(data.getName()));
if (TextUtils.isEmpty(data.getPlaceholder()))
{
editText.setHint(getLabelText(data.getName()));
}
else
{
editText.setFloatingLabelAlwaysShown(true);
editText.setHint(data.getPlaceholder());
}
editText.setFocusable(false);
editText.setIconRight(R.drawable.ic_group_grey);
editionView = vr;
return vr;
}
示例5: setupEditionView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
@Override
public View setupEditionView(Object value)
{
editionValue = value;
if (value instanceof String)
{
editionValue = ISO8601Utils.parse((String) value);
}
View vr = inflater.inflate(R.layout.form_date, null);
editText = (MaterialEditText) vr.findViewById(R.id.date_picker);
editText.setText(getHumanReadableEditionValue());
// Asterix if required
editText.setFloatingLabelText(getLabelText(data.getName()));
if (TextUtils.isEmpty(data.getPlaceholder()))
{
editText.setHint(getLabelText(data.getName()));
}
else
{
editText.setFloatingLabelAlwaysShown(true);
editText.setHint(data.getPlaceholder());
}
editText.setFocusable(false);
editText.setIconRight(R.drawable.ic_event_grey);
editionView = vr;
return vr;
}
示例6: setupEditionView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
@Override
public View setupEditionView(Object value)
{
if (value != null)
{
editionValue = value;
}
View vr = inflater.inflate(R.layout.form_user_picker, null);
editText = (MaterialEditText) vr.findViewById(R.id.user_picker);
editText.setText(getHumanReadableEditionValue());
// Asterix if required
editText.setFloatingLabelText(getLabelText(data.getName()));
if (TextUtils.isEmpty(data.getPlaceholder()))
{
editText.setHint(getLabelText(data.getName()));
}
else
{
editText.setFloatingLabelAlwaysShown(true);
editText.setHint(data.getPlaceholder());
}
editText.setFocusable(false);
editText.setIconRight(R.drawable.ic_account_circle_grey);
editionView = vr;
return vr;
}
示例7: setupdReadView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
public View setupdReadView()
{
ViewGroup vr = (ViewGroup) inflater.inflate(R.layout.form_user_upload, null);
// Manage values & retrieve them
getHumanReadableReadValue();
// Remove icon & clickable, add title,
tv = (MaterialEditText) vr.findViewById(R.id.content_header);
tv.setHint(data.getName());
tv.setIconRight((Drawable) null);
vr.findViewById(R.id.button_container).setBackground(null);
// Display empty
if (!hasDisplayedEmpty(vr, originalValue, true))
{
// Create Item Rows
for (Object item : (List) originalValue)
{
createRow((ViewGroup) vr.findViewById(R.id.contents_container), (RelatedContentRepresentation) item,
true);
}
}
readView = vr;
return vr;
}
示例8: setupEditionView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
@Override
public View setupEditionView(Object value)
{
if (value != null)
{
editionValue = value;
}
getHumanReadableEditionValue();
ViewGroup vr = (ViewGroup) inflater.inflate(R.layout.form_user_upload, null);
editionView = vr;
tv = (MaterialEditText) vr.findViewById(R.id.content_header);
tv.setFocusable(false);
tv.setHint(getLabelText(data.getName()));
displayAddIcon();
displayUnsupported(vr);
// Create Item Rows
if (!hasDisplayedEmpty(vr, editionValue, false))
{
for (Object item : (List) editionValue)
{
createRow((ViewGroup) vr.findViewById(R.id.contents_container), (RelatedContentRepresentation) item,
false);
}
}
return vr;
}
示例9: setupEditionView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
@Override
public View setupEditionView(Object value)
{
if (value != null)
{
editionValue = value;
}
ViewGroup vr = (ViewGroup) inflater.inflate(R.layout.form_radiobuttons, null);
tv = (MaterialEditText) vr.findViewById(R.id.radio_header);
tv.setFocusable(false);
tv.setHint(getLabelText(data.getName()));
radioGroup = (RadioGroup) vr.findViewById(R.id.form_radio_group);
radioGroup.setId(data.getName().length());
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
{
@Override
public void onCheckedChanged(RadioGroup group, int checkedId)
{
tv.setError(null);
getFormManager().evaluateViews();
}
});
// Retrieve info
if (data instanceof RestFieldRepresentation && ((RestFieldRepresentation) data).getEndpoint() != null)
{
List<OptionRepresentation> options = new ArrayList<>(1);
OptionRepresentation rep = new OptionRepresentation("-1", "Loading...");
options.add(rep);
refreshRadioButtons(options);
}
else
{
refreshRadioButtons(data.getOptions());
}
editionView = vr;
return vr;
}