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


Java R类代码示例

本文整理汇总了Java中com.example.android.wizardpager.R的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: StepPagerStrip

import com.example.android.wizardpager.R; //导入依赖的package包/类
public StepPagerStrip(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

    final TypedArray a = context.obtainStyledAttributes(attrs, ATTRS);
    mGravity = a.getInteger(0, mGravity);
    a.recycle();

    final Resources res = getResources();
    mTabWidth = res.getDimensionPixelSize(R.dimen.step_pager_tab_width);
    mTabHeight = res.getDimensionPixelSize(R.dimen.step_pager_tab_height);
    mTabSpacing = res.getDimensionPixelSize(R.dimen.step_pager_tab_spacing);

    mPrevTabPaint = new Paint();
    mPrevTabPaint.setColor(res.getColor(R.color.step_pager_previous_tab_color));

    mSelectedTabPaint = new Paint();
    mSelectedTabPaint.setColor(res.getColor(R.color.step_pager_selected_tab_color));

    mSelectedLastTabPaint = new Paint();
    mSelectedLastTabPaint.setColor(res.getColor(R.color.step_pager_selected_last_tab_color));

    mNextTabPaint = new Paint();
    mNextTabPaint.setColor(res.getColor(R.color.step_pager_next_tab_color));
}
 
开发者ID:gmccowey,项目名称:CalabashAndroidExample,代码行数:25,代码来源:StepPagerStrip.java

示例2: onCreateView

import com.example.android.wizardpager.R; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_page, container, false);
    ((TextView) rootView.findViewById(android.R.id.title)).setText(mPage.getTitle());

    final ListView listView = (ListView) rootView.findViewById(android.R.id.list);
    setListAdapter(new ArrayAdapter<String>(getActivity(),
            android.R.layout.simple_list_item_multiple_choice,
            android.R.id.text1,
            mChoices));
    listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

    // Pre-select currently selected items.
    new Handler().post(new Runnable() {
        @Override
        public void run() {
            ArrayList<String> selectedItems = mPage.getData().getStringArrayList(
                    Page.SIMPLE_DATA_KEY);
            if (selectedItems == null || selectedItems.size() == 0) {
                return;
            }

            Set<String> selectedSet = new HashSet<String>(selectedItems);

            for (int i = 0; i < mChoices.size(); i++) {
                if (selectedSet.contains(mChoices.get(i))) {
                    listView.setItemChecked(i, true);
                }
            }
        }
    });

    return rootView;
}
 
开发者ID:gmccowey,项目名称:CalabashAndroidExample,代码行数:36,代码来源:MultipleChoiceFragment.java

示例3: onCreateView

import com.example.android.wizardpager.R; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_page_customer_info, container, false);
    ((TextView) rootView.findViewById(android.R.id.title)).setText(mPage.getTitle());

    mNameView = ((TextView) rootView.findViewById(R.id.your_name));
    mNameView.setText(mPage.getData().getString(CustomerInfoPage.NAME_DATA_KEY));

    mEmailView = ((TextView) rootView.findViewById(R.id.your_email));
    mEmailView.setText(mPage.getData().getString(CustomerInfoPage.EMAIL_DATA_KEY));
    return rootView;
}
 
开发者ID:gmccowey,项目名称:CalabashAndroidExample,代码行数:14,代码来源:CustomerInfoFragment.java

示例4: onCreateView

import com.example.android.wizardpager.R; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_page, container, false);
    ((TextView) rootView.findViewById(android.R.id.title)).setText(mPage.getTitle());

    final ListView listView = (ListView) rootView.findViewById(android.R.id.list);
    setListAdapter(new ArrayAdapter<String>(getActivity(),
            android.R.layout.simple_list_item_single_choice,
            android.R.id.text1,
            mChoices));
    listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

    // Pre-select currently selected item.
    new Handler().post(new Runnable() {
        @Override
        public void run() {
            String selection = mPage.getData().getString(Page.SIMPLE_DATA_KEY);
            for (int i = 0; i < mChoices.size(); i++) {
                if (mChoices.get(i).equals(selection)) {
                    listView.setItemChecked(i, true);
                    break;
                }
            }
        }
    });

    return rootView;
}
 
开发者ID:gmccowey,项目名称:CalabashAndroidExample,代码行数:30,代码来源:SingleChoiceFragment.java

示例5: onCreateView

import com.example.android.wizardpager.R; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_page, container, false);

    TextView titleView = (TextView) rootView.findViewById(android.R.id.title);
    titleView.setText(R.string.review);
    titleView.setTextColor(getResources().getColor(R.color.review_green));

    ListView listView = (ListView) rootView.findViewById(android.R.id.list);
    setListAdapter(mReviewAdapter);
    listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
    return rootView;
}
 
开发者ID:gmccowey,项目名称:CalabashAndroidExample,代码行数:15,代码来源:ReviewFragment.java

示例6: getView

import com.example.android.wizardpager.R; //导入依赖的package包/类
@Override
public View getView(int position, View view, ViewGroup container) {
    LayoutInflater inflater = LayoutInflater.from(getActivity());
    View rootView = inflater.inflate(R.layout.list_item_review, container, false);

    ReviewItem reviewItem = mCurrentReviewItems.get(position);
    String value = reviewItem.getDisplayValue();
    if (TextUtils.isEmpty(value)) {
        value = "(None)";
    }
    ((TextView) rootView.findViewById(android.R.id.text1)).setText(reviewItem.getTitle());
    ((TextView) rootView.findViewById(android.R.id.text2)).setText(value);
    return rootView;
}
 
开发者ID:gmccowey,项目名称:CalabashAndroidExample,代码行数:15,代码来源:ReviewFragment.java

示例7: onCreateView

import com.example.android.wizardpager.R; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_page_customer_info, container, false);
    ((TextView) rootView.findViewById(android.R.id.title)).setText(mPage.getTitle());

    mNameView = ((TextView) rootView.findViewById(R.id.your_name));
    mNameView.setText(mPage.getData().getString(CustomerInfoPage.NAME_DATA_KEY));

    mEmailView = ((TextView) rootView.findViewById(R.id.your_email));
    mEmailView.setText(mPage.getData().getString(CustomerInfoPage.EMAIL_DATA_KEY));
    return rootView;
}
 
开发者ID:TechFreak,项目名称:WizardPager,代码行数:14,代码来源:CustomerInfoFragment.java


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