• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java R类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setUpSpeakerSocialIcon

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
/**
 * Determines visibility of a social icon, sets up a click listener to allow the user to
 * navigate to the social network associated with the icon, and sets up a content description
 * for the icon.
 */
private void setUpSpeakerSocialIcon(final SessionDetailModel.Speaker speaker,
                                    ImageView socialIcon, final String socialUrl,
                                    String socialNetworkName, final String packageName) {
    if (socialUrl == null || socialUrl.isEmpty()) {
        socialIcon.setVisibility(View.GONE);
    } else {
        socialIcon.setContentDescription(getString(
                        R.string.speaker_social_page,
                        socialNetworkName,
                        speaker.getName())
        );
        socialIcon.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                UIUtils.fireSocialIntent(
                        getActivity(),
                        Uri.parse(socialUrl),
                        packageName
                );
            }
        });
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:29,代码来源:SessionDetailFragment.java


示例2: displayNotification

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
private void displayNotification(Context context, String message) {
    LOGI(TAG, "Displaying notification: " + message);
    ((NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE))
            .notify(0, new NotificationCompat.Builder(context)
                    .setWhen(System.currentTimeMillis())
                    .setSmallIcon(R.drawable.ic_stat_notification)
                    .setTicker(message)
                    .setContentTitle(context.getString(R.string.app_name))
                    .setContentText(message)
                    //.setColor(context.getResources().getColor(R.color.theme_primary))
                        // Note: setColor() is available in the support lib v21+.
                        // We commented it out because we want the source to compile 
                        // against support lib v20. If you are using support lib
                        // v21 or above on Android L, uncomment this line.
                    .setContentIntent(
                            PendingIntent.getActivity(context, 0,
                                    new Intent(context, MyScheduleActivity.class)
                                            .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |
                                                    Intent.FLAG_ACTIVITY_SINGLE_TOP),
                                    0))
                    .setAutoCancel(true)
                    .build());
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:24,代码来源:AnnouncementCommand.java


示例3: initializeAnalyticsTracker

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
/**
 * Initialize the analytics tracker in use by the application. This should only be called
 * once, when the TOS is signed. The {@code applicationContext} parameter MUST be the
 * application context or an object leak could occur.
 */
private static synchronized void initializeAnalyticsTracker(Context applicationContext) {
    sAppContext = applicationContext;
    if (mTracker == null) {
        int useProfile;
        if (BuildConfig.DEBUG) {
            LOGD(TAG, "Analytics manager using DEBUG ANALYTICS PROFILE.");
            useProfile = R.xml.analytics_debug;
        } else {
            useProfile = R.xml.analytics_release;
        }

        try {
            mTracker = GoogleAnalytics.getInstance(applicationContext).newTracker(useProfile);
        } catch (Exception e) {
            // If anything goes wrong, force an opt-out of tracking. It's better to accidentally
            // protect privacy than accidentally collect data.
            setAnalyticsEnabled(false);
        }
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:26,代码来源:AnalyticsHelper.java


示例4: onCreateDialog

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    int padding = getResources().getDimensionPixelSize(R.dimen.content_padding_dialog);

    TextView eulaTextView = new TextView(getActivity());
    eulaTextView.setText(Html.fromHtml(getString(R.string.eula_legal_text)));
    eulaTextView.setMovementMethod(LinkMovementMethod.getInstance());
    eulaTextView.setPadding(padding, padding, padding, padding);

    return new AlertDialog.Builder(getActivity())
            .setTitle(R.string.about_eula)
            .setView(eulaTextView)
            .setPositiveButton(R.string.ok,
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                            dialog.dismiss();
                        }
                    }
            )
            .create();
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:22,代码来源:AboutUtils.java


示例5: setUpModel

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
@Before
public void setUpModel() {
    // Create a fake model to simulate a live session.
    SessionDetailModel fakeModel = new FakeSessionDetailModelLive(mSessionUri,
            mActivityRule.getActivity().getApplicationContext(),
            new SessionsHelper(mActivityRule.getActivity()));

    // Set up the presenter with the fake model.
    final PresenterFragmentImpl presenter = mActivityRule.getActivity()
            .addPresenterFragment(R.id.session_detail_frag, fakeModel,
                    SessionDetailModel.SessionDetailQueryEnum.values(),
                    SessionDetailModel.SessionDetailUserActionEnum.values());

    mActivityRule.getActivity().runOnUiThread(new Runnable() {

        @Override
        public void run() {
            presenter.getLoaderManager().restartLoader(0, null, presenter);
        }
    });
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:22,代码来源:SessionDetailActivityTestLiveSession.java


示例6: getLinks

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
@Override
public List<Pair<Integer, Intent>> getLinks(){
    List<Pair<Integer, Intent>> links = new ArrayList<Pair<Integer, Intent>>();

    links.add(new Pair<Integer, Intent>(
            R.string.session_feedback_submitlink,
            getFeedbackIntent()
    ));

    links.add(new Pair<Integer, Intent>(
            R.string.session_link_youtube,
            new Intent(Intent.ACTION_VIEW, Uri.parse("http://youtube.com/"))
    ));

    return links;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:17,代码来源:SessionDetailActivityTestSessionNotInSchedule.java


示例7: setTabLayoutContentDescriptions

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
private void setTabLayoutContentDescriptions() {
    LayoutInflater inflater = getLayoutInflater();
    int gap = mDayZeroAdapter == null ? 0 : 1;
    for (int i = 0, count = mTabLayout.getTabCount(); i < count; i++) {
        TabLayout.Tab tab = mTabLayout.getTabAt(i);
        TextView view = (TextView) inflater.inflate(R.layout.tab_my_schedule, mTabLayout, false);
        view.setId(baseTabViewId + i);
        view.setText(tab.getText());
        if (i == 0) {
            view.setContentDescription(
                    getString(R.string.talkback_selected,
                            getString(R.string.a11y_button, tab.getText())));
        } else {
            view.setContentDescription(
                    getString(R.string.a11y_button, tab.getText()));
        }
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            view.announceForAccessibility(
                    getString(R.string.my_schedule_tab_desc_a11y, getDayName(i - gap)));
        }
        tab.setCustomView(view);
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:24,代码来源:MyScheduleActivity.java


示例8: DrawShadowFrameLayout

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
public DrawShadowFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    final TypedArray a = context.obtainStyledAttributes(attrs,
            R.styleable.DrawShadowFrameLayout, 0, 0);

    mShadowDrawable = a.getDrawable(R.styleable.DrawShadowFrameLayout_shadowDrawable);
    if (mShadowDrawable != null) {
        mShadowDrawable.setCallback(this);
        if (mShadowDrawable instanceof NinePatchDrawable) {
            mShadowNinePatchDrawable = (NinePatchDrawable) mShadowDrawable;
        }
    }

    mShadowVisible = a.getBoolean(R.styleable.DrawShadowFrameLayout_shadowVisible, true);
    setWillNotDraw(!mShadowVisible || mShadowDrawable == null);

    a.recycle();
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:19,代码来源:DrawShadowFrameLayout.java


示例9: setUpButterBar

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
public static void setUpButterBar(View butterBar, String messageText, String actionText,
        View.OnClickListener listener) {
    if (butterBar == null) {
        LOGE(TAG, "Failed to set up butter bar: it's null.");
        return;
    }

    TextView textView = (TextView) butterBar.findViewById(R.id.butter_bar_text);
    if (textView != null) {
        textView.setText(messageText);
    }

    Button button = (Button) butterBar.findViewById(R.id.butter_bar_button);
    if (button != null) {
        button.setText(actionText == null ? "" : actionText);
        button.setVisibility(!TextUtils.isEmpty(actionText) ? View.VISIBLE : View.GONE);
    }

    button.setOnClickListener(listener);
    butterBar.setVisibility(View.VISIBLE);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:22,代码来源:UIUtils.java


示例10: onCreate

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.video_library_act);

    addPresenterFragment(R.id.video_library_frag,
            new VideoLibraryModel(getApplicationContext(), this),
            new VideoLibraryQueryEnum[]{VideoLibraryQueryEnum.VIDEOS,
                    VideoLibraryQueryEnum.MY_VIEWED_VIDEOS},
            new VideoLibraryUserActionEnum[]{VideoLibraryUserActionEnum.RELOAD,
                    VideoLibraryUserActionEnum.VIDEO_PLAYED});

    // ANALYTICS SCREEN: View the video library screen
    // Contains: Nothing (Page name is a constant)
    AnalyticsHelper.sendScreenView(SCREEN_LABEL);

    registerHideableHeaderView(findViewById(R.id.headerbar));
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:20,代码来源:VideoLibraryActivity.java


示例11: getRoomIcon

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
/**
 * Returns the drawable Id of icon to use for a room type.
 */
public static
@DrawableRes
int getRoomIcon(int markerType) {
    switch (markerType) {
        case MarkerModel.TYPE_SESSION:
            return R.drawable.ic_map_session;
        case MarkerModel.TYPE_PLAIN:
            return R.drawable.ic_map_pin;
        case MarkerModel.TYPE_CODELAB:
            return R.drawable.ic_map_codelab;
        case MarkerModel.TYPE_SANDBOX:
            return R.drawable.ic_map_sandbox;
        case MarkerModel.TYPE_OFFICEHOURS:
            return R.drawable.ic_map_officehours;
        case MarkerModel.TYPE_MISC:
            return R.drawable.ic_map_misc;
        case MarkerModel.TYPE_MOSCONE:
            return R.drawable.ic_map_moscone;
        default:
            return R.drawable.ic_map_pin;
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:26,代码来源:MapUtils.java


示例12: onCreate

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.explore_io_act);
    addPresenterFragment(
            R.id.explore_library_frag,
            new ExploreModel(
                    getApplicationContext()),
            new QueryEnum[]{
                    ExploreQueryEnum.SESSIONS,
                    ExploreQueryEnum.TAGS},
            new ExploreUserActionEnum[]{
                    ExploreUserActionEnum.RELOAD});

    // ANALYTICS SCREEN: View the Explore I/O screen
    // Contains: Nothing (Page name is a constant)
    AnalyticsHelper.sendScreenView(SCREEN_LABEL);

    registerHideableHeaderView(findViewById(R.id.headerbar));
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:22,代码来源:ExploreIOActivity.java


示例13: MyScheduleAdapter

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
public MyScheduleAdapter(Context context, LUtils lUtils) {
    mContext = context;
    mLUtils = lUtils;
    Resources resources = context.getResources();
    mHourColorDefault = resources.getColor(R.color.my_schedule_hour_header_default);
    mHourColorPast = resources.getColor(R.color.my_schedule_hour_header_finished);
    mTitleColorDefault = resources.getColor(R.color.my_schedule_session_title_default);
    mTitleColorPast = resources.getColor(R.color.my_schedule_session_title_finished);
    mIconColorDefault = resources.getColor(R.color.my_schedule_icon_default);
    mIconColorPast = resources.getColor(R.color.my_schedule_icon_finished);
    mColorConflict = resources.getColor(R.color.my_schedule_conflict);
    mColorBackgroundDefault = resources.getColor(android.R.color.white);
    mColorBackgroundPast = resources.getColor(R.color.my_schedule_past_background);
    mListSpacing = resources.getDimensionPixelOffset(R.dimen.element_spacing_normal);
    TypedArray a = context.obtainStyledAttributes(new int[]{R.attr.selectableItemBackground});
    mSelectableItemBackground = a.getResourceId(0, 0);
    a.recycle();
    mIsRtl = UIUtils.isRtl(context);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:20,代码来源:MyScheduleAdapter.java


示例14: getConferenceCredentialsMessageData

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
/**
 * Return card data representing a message to send to users before registering.
 */
public static MessageData getConferenceCredentialsMessageData(Context context) {
    MessageData messageData = new MessageData();
    messageData.setMessageStringResourceId(R.string.explore_io_msgcards_conf_creds_card);
    messageData.setEndButtonStringResourceId(R.string.got_it);
    messageData.setIconDrawableId(R.drawable.message_card_credentials);

    messageData.setEndButtonClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            LOGD(TAG, "Marking conference credentials card dismissed.");

            ConfMessageCardUtils.markDismissedConfMessageCard(
                    view.getContext(),
                    ConfMessageCardUtils.ConfMessageCard.CONFERENCE_CREDENTIALS);
        }
    });

    return messageData;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:23,代码来源:MessageCardHelper.java


示例15: getKeynoteAccessMessageData

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
/**
 * Return card data for instructions on where to queue for the Keynote.
 */
public static MessageData getKeynoteAccessMessageData(Context context) {
    MessageData messageData = new MessageData();
    messageData.setMessageStringResourceId(R.string.explore_io_msgcards_keynote_access_card);
    messageData.setEndButtonStringResourceId(R.string.got_it);
    messageData.setIconDrawableId(R.drawable.message_card_keynote);

    messageData.setEndButtonClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            LOGD(TAG, "Marking keynote access card dismissed.");

            ConfMessageCardUtils.markDismissedConfMessageCard(
                    view.getContext(),
                    ConfMessageCardUtils.ConfMessageCard.KEYNOTE_ACCESS);
        }
    });

    return messageData;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:23,代码来源:MessageCardHelper.java


示例16: trySetupSwipeRefresh

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
private void trySetupSwipeRefresh() {
    mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout);
    if (mSwipeRefreshLayout != null) {
        mSwipeRefreshLayout.setColorSchemeResources(
                R.color.flat_button_text);
        mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                requestDataRefresh();
            }
        });

        if (mSwipeRefreshLayout instanceof MultiSwipeRefreshLayout) {
            MultiSwipeRefreshLayout mswrl = (MultiSwipeRefreshLayout) mSwipeRefreshLayout;
            mswrl.setCanChildScrollUpCallback(this);
        }
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:19,代码来源:BaseActivity.java


示例17: displayDogfoodWarningDialog

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
/**
 * Display dogfood build warning and mark that it was shown.
 */
private void displayDogfoodWarningDialog() {
    new AlertDialog.Builder(this)
            .setTitle(Config.DOGFOOD_BUILD_WARNING_TITLE)
            .setMessage(Config.DOGFOOD_BUILD_WARNING_TEXT)
            .setPositiveButton(android.R.string.ok, null).show();
    SettingsUtils.markDebugWarningShown(this);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:11,代码来源:WelcomeActivity.java


示例18: onResume

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    getActivity().invalidateOptionsMenu();

    // configure video fragment's top clearance to take our overlaid controls (Action Bar
    // and spinner box) into account.
    int actionBarSize = UIUtils.calculateActionBarSize(getActivity());
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) getActivity().findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:16,代码来源:VideoLibraryFragment.java


示例19: headerBar_HidesAfterSwipeUp

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
@Test
public void headerBar_HidesAfterSwipeUp() {
    ViewInteraction view = onView(withId(R.id.headerbar));

    // Swiping up should hide the header bar.
    onView(withId(R.id.videos_collection_view)).perform(swipeUp());
    onView(withId(R.id.videos_collection_view)).perform(swipeUp());

    // Check if the header bar is hidden.
    view.check(matches(not(isDisplayed())));
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:12,代码来源:VideoLibraryFilteredActivityTest.java


示例20: initActionBarAutoHide

import com.google.samples.apps.iosched.R; //导入依赖的package包/类
/**
 * Initializes the Action Bar auto-hide (aka Quick Recall) effect.
 */
private void initActionBarAutoHide() {
    mActionBarAutoHideEnabled = true;
    mActionBarAutoHideMinY = getResources().getDimensionPixelSize(
            R.dimen.action_bar_auto_hide_min_y);
    mActionBarAutoHideSensivity = getResources().getDimensionPixelSize(
            R.dimen.action_bar_auto_hide_sensivity);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:11,代码来源:BaseActivity.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WxMpXmlMessage类代码示例发布时间:2022-05-22
下一篇:
Java RetrieveConf类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap