本文整理匯總了Java中com.rengwuxian.materialedittext.MaterialEditText.setFloatingLabelText方法的典型用法代碼示例。如果您正苦於以下問題:Java MaterialEditText.setFloatingLabelText方法的具體用法?Java MaterialEditText.setFloatingLabelText怎麽用?Java MaterialEditText.setFloatingLabelText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.rengwuxian.materialedittext.MaterialEditText
的用法示例。
在下文中一共展示了MaterialEditText.setFloatingLabelText方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setupEditionView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
@Override
public View setupEditionView(Object value)
{
MaterialEditText edit = (MaterialEditText) super.setupEditionView(value);
edit.addTextChangedListener(new DecimalTextWatcher(edit, 10, 2));
edit.setFloatingLabelText(getLabelText(getCurrencyLabel()));
if ((((AmountFieldRepresentation) data).isEnableFractions()))
{
edit.setInputType(EditorInfo.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL
| EditorInfo.TYPE_NUMBER_FLAG_SIGNED);
}
else
{
edit.setInputType(EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_FLAG_SIGNED);
}
return edit;
}
示例2: 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;
}
示例3: 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;
}
示例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_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;
}
示例5: setupdReadView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
public View setupdReadView()
{
if (!(data instanceof HyperlinkRepresentation)) { return null; }
View vr = inflater.inflate(R.layout.form_hyperlink, null);
vr.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Intent i = new Intent(Intent.ACTION_VIEW);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.setData(Uri.parse((((HyperlinkRepresentation) data).getHyperlinkUrl())));
getFragment().getActivity().startActivity(i);
}
});
MaterialEditText editText = (MaterialEditText) vr.findViewById(R.id.hyperlink);
editText.setText((((HyperlinkRepresentation) data).getDisplayText()));
editText.setHideUnderline(true);
editText.setHelperTextAlwaysShown(true);
try
{
editText.setHelperText(Uri.parse(((HyperlinkRepresentation) data).getHyperlinkUrl()).getHost());
}
catch (Exception e)
{
}
// Asterix if required
editText.setFloatingLabelText(data.getName());
editText.setFloatingLabelAlwaysShown(true);
editText.setIconRight(R.drawable.ic_link_grey);
editionView = vr;
readView = vr;
return vr;
}
示例6: setupEditionView
import com.rengwuxian.materialedittext.MaterialEditText; //導入方法依賴的package包/類
@Override
public View setupEditionView(Object value)
{
editionValue = value;
View vr = inflater.inflate(R.layout.form_hyperlink, null);
vr.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Intent i = new Intent(Intent.ACTION_VIEW);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.setData(Uri.parse(((HyperlinkRepresentation) data).getHyperlinkUrl()));
getFragment().getActivity().startActivity(i);
}
});
MaterialEditText editText = (MaterialEditText) vr.findViewById(R.id.hyperlink);
editText.setText(((HyperlinkRepresentation) data).getDisplayText());
StringBuilder builder = new StringBuilder(data.getName());
editText.setHideUnderline(true);
try
{
builder.append(" (");
builder.append(Uri.parse(((HyperlinkRepresentation) data).getHyperlinkUrl()).getAuthority()
.replaceFirst("^(http://|http://www\\.|www\\.)", ""));
builder.append(")");
}
catch (Exception e)
{
}
editText.setFloatingLabelText(builder.toString());
editText.setFloatingLabelAlwaysShown(true);
editText.setIconRight(R.drawable.ic_link_grey);
editionView = vr;
return vr;
}