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


Java R类代码示例

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


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

示例1: displayNotification

import com.google.android.apps.iosched.R; //导入依赖的package包/类
private void displayNotification(Context context, String message) {
    LOGI(TAG, "displayNotification: " + 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)
                    .setContentIntent(
                            PendingIntent.getActivity(context, 0,
                                    new Intent(context, HomeActivity.class)
                                            .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |
                                                    Intent.FLAG_ACTIVITY_SINGLE_TOP),
                                    0))
                    .setAutoCancel(true)
                    .getNotification());
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:19,代码来源:GCMIntentService.java

示例2: showFirstBeamDialog

import com.google.android.apps.iosched.R; //导入依赖的package包/类
private void showFirstBeamDialog() {
    new AlertDialog.Builder(this)
            .setTitle(R.string.just_beamed)
            .setMessage(R.string.beam_unlocked_session)
            .setNegativeButton(R.string.close, null)
            .setPositiveButton(R.string.view_beam_session,
                    new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface di, int i) {
                            BeamUtils.launchBeamSession(SessionDetailActivity.this);
                            di.dismiss();
                        }
                    })
            .create()
            .show();
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:17,代码来源:SessionDetailActivity.java

示例3: onCreate

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

    if (getIntent().hasExtra(Intent.EXTRA_TITLE)) {
        setTitle(getIntent().getStringExtra(Intent.EXTRA_TITLE));
    }

    final String customTitle = getIntent().getStringExtra(Intent.EXTRA_TITLE);
    setTitle(customTitle != null ? customTitle : getTitle());

    if (savedInstanceState == null) {
        mFragment = onCreatePane();
        mFragment.setArguments(intentToFragmentArguments(getIntent()));
        getSupportFragmentManager().beginTransaction()
                .add(R.id.root_container, mFragment, "single_pane")
                .commit();
    } else {
        mFragment = getSupportFragmentManager().findFragmentByTag("single_pane");
    }
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:23,代码来源:SimpleSinglePaneActivity.java

示例4: onCreate

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

    setContentView(R.layout.activity_search);
    mTwoPane = (findViewById(R.id.fragment_container_detail) != null);

    FragmentManager fm = getSupportFragmentManager();
    mSessionsFragment = (SessionsFragment) fm.findFragmentById(R.id.fragment_container_master);
    if (mSessionsFragment == null) {
        mSessionsFragment = new SessionsFragment();
        fm.beginTransaction()
                .add(R.id.fragment_container_master, mSessionsFragment)
                .commit();
    }

    mDetailFragment = fm.findFragmentById(R.id.fragment_container_detail);

    mImageLoader = new ImageLoader(this, R.drawable.person_image_empty)
            .setMaxImageSize(getResources().getDimensionPixelSize(R.dimen.speaker_image_size))
            .setFadeInImage(UIUtils.hasHoneycombMR1());
}
 
开发者ID:TheDeltaProgram,项目名称:iosched2013,代码行数:23,代码来源:SearchActivity.java

示例5: instantiateItem

import com.google.android.apps.iosched.R; //导入依赖的package包/类
@Override
public Object instantiateItem(ViewGroup pager, int position) {
    mAnnouncementsCursor.moveToPosition(position);
    LinearLayout rootView = (LinearLayout) mInflater.inflate(
            R.layout.pager_item_announcement, pager, false);
    TextView titleView = (TextView) rootView.findViewById(R.id.announcement_title);
    TextView subtitleView = (TextView) rootView.findViewById(R.id.announcement_ago);
    titleView.setText(mAnnouncementsCursor.getString(mTitleCol));

    final long date = mAnnouncementsCursor.getLong(mDateCol);
    final String when = UIUtils.getTimeAgo(date, getActivity());
    final String url = mAnnouncementsCursor.getString(mUrlCol);

    subtitleView.setText(when);
    rootView.setTag(url);

    if (!TextUtils.isEmpty(url)) {
        rootView.setClickable(true);
        rootView.setOnClickListener(mAnnouncementClick);
    } else {
        rootView.setClickable(false);
    }

    pager.addView(rootView, 0);
    return rootView;
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:27,代码来源:WhatsOnFragment.java

示例6: formatSessionSubtitle

import com.google.android.apps.iosched.R; //导入依赖的package包/类
/**
 * Format and return the given {@link Blocks} and {@link Rooms} values using
 * {@link #CONFERENCE_TIME_ZONE}.
 */
public static String formatSessionSubtitle(String sessionTitle,
        long blockStart, long blockEnd, String roomName, StringBuilder recycle,
        Context context) {

    // Determine if the session is in the past
    long currentTimeMillis = UIUtils.getCurrentTime(context);
    boolean conferenceEnded = currentTimeMillis > UIUtils.CONFERENCE_END_MILLIS;
    boolean blockEnded = currentTimeMillis > blockEnd;
    if (blockEnded && !conferenceEnded) {
        return context.getString(R.string.session_finished);
    }

    if (sEmptyRoomText == null) {
        sEmptyRoomText = context.getText(R.string.unknown_room);
    }

    if (roomName == null) {
        return context.getString(R.string.session_subtitle,
                formatBlockTimeString(blockStart, blockEnd, recycle, context),
                sEmptyRoomText);
    }

    return context.getString(R.string.session_subtitle,
            formatBlockTimeString(blockStart, blockEnd, recycle, context), roomName);
}
 
开发者ID:TheDeltaProgram,项目名称:iosched2013,代码行数:30,代码来源:UIUtils.java

示例7: onConfigurationChanged

import com.google.android.apps.iosched.R; //导入依赖的package包/类
@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    boolean landscape = (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE);

    LinearLayout spacerView = (LinearLayout) findViewById(R.id.map_detail_spacer);
    spacerView.setOrientation(landscape ? LinearLayout.HORIZONTAL : LinearLayout.VERTICAL);
    spacerView.setGravity(landscape ? Gravity.END : Gravity.BOTTOM);

    View popupView = findViewById(R.id.map_detail_popup);
    LinearLayout.LayoutParams popupLayoutParams = (LinearLayout.LayoutParams)
            popupView.getLayoutParams();
    popupLayoutParams.width = landscape ? 0 : ViewGroup.LayoutParams.MATCH_PARENT;
    popupLayoutParams.height = landscape ? ViewGroup.LayoutParams.MATCH_PARENT : 0;
    popupView.setLayoutParams(popupLayoutParams);

    popupView.requestLayout();

    updateMapPadding();
}
 
开发者ID:TheDeltaProgram,项目名称:iosched2013,代码行数:21,代码来源:MapMultiPaneActivity.java

示例8: onCreateOptionsMenu

import com.google.android.apps.iosched.R; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);
    mOptionsMenu = menu;
    getMenuInflater().inflate(R.menu.home, menu);
    MenuItem searchItem = menu.findItem(R.id.menu_search);
    if (searchItem != null && UIUtils.hasHoneycomb()) {
        SearchView searchView = (SearchView) searchItem.getActionView();
        if (searchView != null) {
            SearchManager searchManager = (SearchManager) getSystemService(SEARCH_SERVICE);
            searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
            searchView.setQueryRefinementEnabled(true);
        }
    }
    MenuItem wifiItem = menu.findItem(R.id.menu_wifi);
    if (!PrefUtils.isAttendeeAtVenue(this) ||
            (WiFiUtils.isWiFiEnabled(this) && WiFiUtils.isWiFiApConfigured(this))) {
        wifiItem.setVisible(false);
    }
    return true;
}
 
开发者ID:TheDeltaProgram,项目名称:iosched2013,代码行数:23,代码来源:HomeActivity.java

示例9: bindView

import com.google.android.apps.iosched.R; //导入依赖的package包/类
@Override
public void bindView(View view, Context context, Cursor cursor) {
    // Bind view that appears in the selected spinner or in the drop-down
    final TextView titleView = (TextView) view.findViewById(android.R.id.text1);
    final TextView subTitleView = (TextView) view.findViewById(android.R.id.text2);

    String trackName = cursor.getString(SessionsQuery.TRACK_NAME);
    if (TextUtils.isEmpty(trackName)) {
        trackName = getString(R.string.app_name);
    } else {
        trackName = getString(R.string.session_livestream_track_title, trackName);
    }

    String sessionTitle = cursor.getString(SessionsQuery.TITLE);

    if (subTitleView != null) { // Drop-down view
        titleView.setText(trackName);
        subTitleView.setText(sessionTitle);
    } else { // Selected view
        titleView.setText(getString(R.string.session_livestream_title) + ": " + trackName);
    }
}
 
开发者ID:TheDeltaProgram,项目名称:iosched2013,代码行数:23,代码来源:SessionLivestreamActivity.java

示例10: onCreateView

import com.google.android.apps.iosched.R; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_list_with_empty_container_inset,
            container, false);
    TextView emptyView = new TextView(getActivity(), null, R.attr.emptyText);
    emptyView.setText(UIUtils.shouldShowLiveSessionsOnly(getActivity())
            ? R.string.empty_live_streamed_sessions
            : R.string.empty_sessions);
    ((ViewGroup) rootView.findViewById(android.R.id.empty)).addView(emptyView);

    mMultiSelectionController = MultiSelectionUtil.attachMultiSelectionController(
            (ListView) rootView.findViewById(android.R.id.list),
            (ActionBarActivity) getActivity(),
            this);
    if (savedInstanceState == null && isMenuVisible()) {
        savedInstanceState = mViewDestroyedInstanceState;
    }
    mMultiSelectionController.tryRestoreInstanceState(savedInstanceState);
    return rootView;
}
 
开发者ID:TheDeltaProgram,项目名称:iosched2013,代码行数:22,代码来源:SessionsFragment.java

示例11: onCreateOptionsMenu

import com.google.android.apps.iosched.R; //导入依赖的package包/类
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);
    mOptionsMenu = menu;
    getSupportMenuInflater().inflate(R.menu.home, menu);
    setupSearchMenuItem(menu);

    if (!BeamUtils.isBeamUnlocked(this)) {
        // Only show Beam unlocked after first Beam
        MenuItem beamItem = menu.findItem(R.id.menu_beam);
        if (beamItem != null) {
            menu.removeItem(beamItem.getItemId());
        }
    }
    return true;
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:17,代码来源:HomeActivity.java

示例12: showHelpDialog

import com.google.android.apps.iosched.R; //导入依赖的package包/类
void showHelpDialog() {
    new AlertDialog.Builder(this)
            .setTitle(R.string.title_beam)
            .setMessage(R.string.beam_unlocked_help)
            .setNegativeButton(R.string.close, null)
            .setPositiveButton(R.string.view_beam_session,
                    new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface di, int i) {
                            BeamUtils.launchBeamSession(BeamActivity.this);
                            di.dismiss();
                        }
                    })
            .create()
            .show();
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:17,代码来源:BeamActivity.java

示例13: reloadFromIntent

import com.google.android.apps.iosched.R; //导入依赖的package包/类
/**
 * Reloads all data in the activity and fragments from a given intent
 * @param intent The intent to load from
 */
private void reloadFromIntent(Intent intent) {
    final String youtubeUrl = intent.getStringExtra(EXTRA_YOUTUBE_URL);
    // Check if youtube url is set as an extra first
    if (youtubeUrl != null) {
        mLoadFromExtras = true;
        String trackName = intent.getStringExtra(EXTRA_TRACK);
        String actionBarTitle;
        if (trackName == null) {
            actionBarTitle = getString(R.string.session_livestream_title);
        } else {
            isKeynote = KEYNOTE_TRACK_NAME.equals(trackName);
            actionBarTitle = trackName + " - " + getString(R.string.session_livestream_title);
        }
        getSupportActionBar().setTitle(actionBarTitle);
        updateSessionViews(youtubeUrl, intent.getStringExtra(EXTRA_TITLE),
                intent.getStringExtra(EXTRA_ABSTRACT),
                UIUtils.CONFERENCE_HASHTAG, trackName);
    } else {
        // Otherwise load from session uri
        reloadFromUri(intent.getData());
    }
}
 
开发者ID:TheDeltaProgram,项目名称:iosched2013,代码行数:27,代码来源:SessionLivestreamActivity.java

示例14: onBeamSent

import com.google.android.apps.iosched.R; //导入依赖的package包/类
private void onBeamSent() {
    if (!BeamUtils.isBeamUnlocked(this)) {
        BeamUtils.setBeamUnlocked(this);
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                new AlertDialog.Builder(BaseActivity.this)
                        .setTitle(R.string.just_beamed)
                        .setMessage(R.string.beam_unlocked_default)
                        .setNegativeButton(R.string.close, null)
                        .setPositiveButton(R.string.view_beam_session,
                                new DialogInterface.OnClickListener() {
                                    @Override
                                    public void onClick(DialogInterface di, int i) {
                                        BeamUtils.launchBeamSession(BaseActivity.this);
                                        di.dismiss();
                                    }
                                })
                        .create()
                        .show();
            }
        });
    }
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:25,代码来源:BaseActivity.java

示例15: onCreate

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

    if (getIntent().hasExtra(EXTRA_FINISH_INTENT)) {
        mFinishIntent = getIntent().getParcelableExtra(EXTRA_FINISH_INTENT);
    }

    if (savedInstanceState == null) {
        getSupportFragmentManager().beginTransaction()
                .add(R.id.fragment_container, new ChooseAccountFragment(), "choose_account")
                .commit();
    }
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:17,代码来源:AccountActivity.java


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