当前位置: 首页>>代码示例>>Java>>正文


Java MaterialEditText.setIconRight方法代码示例

本文整理汇总了Java中com.rengwuxian.materialedittext.MaterialEditText.setIconRight方法的典型用法代码示例。如果您正苦于以下问题:Java MaterialEditText.setIconRight方法的具体用法?Java MaterialEditText.setIconRight怎么用?Java MaterialEditText.setIconRight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.rengwuxian.materialedittext.MaterialEditText的用法示例。


在下文中一共展示了MaterialEditText.setIconRight方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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;
}
 
开发者ID:Alfresco,项目名称:activiti-android-app,代码行数:33,代码来源:UserGroupPickerField.java

示例2: 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;
}
 
开发者ID:Alfresco,项目名称:activiti-android-app,代码行数:34,代码来源:DateField.java

示例3: 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;
}
 
开发者ID:Alfresco,项目名称:activiti-android-app,代码行数:33,代码来源:UserPickerField.java

示例4: 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;
}
 
开发者ID:Alfresco,项目名称:activiti-android-app,代码行数:29,代码来源:UploadPickerField.java

示例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;
}
 
开发者ID:Alfresco,项目名称:activiti-android-app,代码行数:40,代码来源:HyperlinkField.java

示例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;
}
 
开发者ID:Alfresco,项目名称:activiti-android-app,代码行数:42,代码来源:HyperlinkField.java


注:本文中的com.rengwuxian.materialedittext.MaterialEditText.setIconRight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。