Java Code Examples for com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView#setOrientation()

The following examples show how to use com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView#setOrientation() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SettingActivity.java    From v9porn with MIT License 5 votes vote down vote up
private QMUICommonListItemView verifyGoogleRecaptcha() {
    QMUICommonListItemView googleRecaptchaItemWithChevron = qmuiGroupListView.createItemView(getString(R.string.google_recaptcha_verify));
    googleRecaptchaItemWithChevron.setId(R.id.setting_item_google_recaptcha_verify);
    googleRecaptchaItemWithChevron.setOrientation(QMUICommonListItemView.VERTICAL);

    googleRecaptchaItemWithChevron.setDetailText("手动验证Google机器人");
    googleRecaptchaItemWithChevron.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_CHEVRON);

    return googleRecaptchaItemWithChevron;
}
 
Example 2
Source File: SettingActivity.java    From v9porn with MIT License 5 votes vote down vote up
private QMUICommonListItemView verifyGoogleRecaptcha() {
    QMUICommonListItemView googleRecaptchaItemWithChevron = qmuiGroupListView.createItemView(getString(R.string.google_recaptcha_verify));
    googleRecaptchaItemWithChevron.setId(R.id.setting_item_google_recaptcha_verify);
    googleRecaptchaItemWithChevron.setOrientation(QMUICommonListItemView.VERTICAL);

    googleRecaptchaItemWithChevron.setDetailText("手动验证Google机器人");
    googleRecaptchaItemWithChevron.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_CHEVRON);

    return googleRecaptchaItemWithChevron;
}
 
Example 3
Source File: AboutActivity.java    From PoetryWeather with Apache License 2.0 5 votes vote down vote up
private void initAboutList() {
    //初始化LOGO下面的名称和版本号
    mVersionTextView.setText("诗语天气 V1.0.2");

    //作者
    QMUICommonListItemView itemAuthor = mAboutGroupListView.createItemView("作者");
    itemAuthor.setDetailText("黄振敏");
    //微信
    QMUICommonListItemView itemWechat = mAboutGroupListView.createItemView("微信");
    itemWechat.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_CHEVRON);
    itemWechat.setDetailText("hzm1998hzm");
    itemWechat.setTag(R.id.listitem_tag_1);
    //QQ
    QMUICommonListItemView itemQQ = mAboutGroupListView.createItemView("QQ");
    itemQQ.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_CHEVRON);
    itemQQ.setDetailText("934585316");
    itemQQ.setTag(R.id.listitem_tag_2);
    //GitHub主页
    QMUICommonListItemView itemGitHub = mAboutGroupListView.createItemView("作者GitHub主页");
    itemGitHub.setOrientation(QMUICommonListItemView.VERTICAL);
    itemGitHub.setDetailText("https://github.com/hzm0321");
    itemGitHub.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_CHEVRON);
    itemGitHub.setTag(R.id.listitem_tag_3);
    QMUIGroupListView.newSection(this)
            .setDescription(getString(R.string.about_description))
            .addItemView(itemAuthor, null)
            .addItemView(itemWechat, mOnClickListenerListItem)
            .addItemView(itemQQ, mOnClickListenerListItem)
            .addItemView(itemGitHub, mOnClickListenerListItem)
            .addTo(mAboutGroupListView);

    //初始化页面底部的版权
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy", Locale.CHINA);
    String currentYear = dateFormat.format(new java.util.Date());
    mCopyrightTextView.setText(String.format(getResources().getString(R.string.about_copyright), currentYear));

}
 
Example 4
Source File: QMUIGroupListViewActivity.java    From BaseUIFrame with MIT License 4 votes vote down vote up
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        ButterKnife.bind(mActivity);
        title = getIntent().getStringExtra(MyApp.INTENT_VALUE_TITLE_STR);
        if (title != null) {
            topBar.setTitle(title);
        }

        //标准样式
        QMUICommonListItemView normalItem = mGroupListView.createItemView("Item 1");
        normalItem.setOrientation(QMUICommonListItemView.VERTICAL);

        //右边描述信息
        QMUICommonListItemView itemWithDetail = mGroupListView.createItemView("Item 2");
        itemWithDetail.setDetailText("右边Detail描述信息");

        //下方描述信息
        QMUICommonListItemView itemWithDetailBelow = mGroupListView.createItemView("Item 3");
        itemWithDetailBelow.setOrientation(QMUICommonListItemView.VERTICAL);
        itemWithDetailBelow.setDetailText("下方Detail描述信息");

        //带向右箭头的ITEM
        QMUICommonListItemView itemWithChevron = mGroupListView.createItemView("Item 4");
        itemWithChevron.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_CHEVRON);

        //带Boolean SWITCH选择器的ITEM
        QMUICommonListItemView itemWithSwitch = mGroupListView.createItemView("Item 5");
        itemWithSwitch.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_SWITCH);
        itemWithSwitch.getSwitch().setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                ToastUtil.showToast("checked = " + isChecked);
            }
        });


        mGroupListView.newSection(mActivity)
                .setTitle("Section 1: 默认提供的样式(HEAD)")
//                .setDescription("Section 1 的描述(FOOT)")
                .addItemView(normalItem, onClickListener)
                .addItemView(itemWithDetail, onClickListener)
                .addItemView(itemWithDetailBelow, onClickListener)
                .addItemView(itemWithChevron, onClickListener)
                .addItemView(itemWithSwitch, onClickListener)
                .addTo(mGroupListView);


        QMUICommonListItemView itemWithCustom = mGroupListView.createItemView("Item 6");
        itemWithCustom.setAccessoryType(QMUICommonListItemView.ACCESSORY_TYPE_CUSTOM);
        QMUILoadingView loadingView = new QMUILoadingView(mActivity);
        itemWithCustom.addAccessoryCustomView(loadingView);

        QMUIGroupListView.newSection(mActivity)
                .setTitle("Section 2: 自定义右侧 View")
                .addItemView(itemWithCustom, onClickListener)
                .addTo(mGroupListView);

    }