Android Open Source - rsmonitor-heartrate Activity Main From Project Back to project page rsmonitor-heartrate .
License The source code is released under:
GNU General Public License
If you think the Android project rsmonitor-heartrate listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package com.renaultsport.heartrate;
/ / f r o m w w w . j a v a 2 s . c o m
import android.app.TabActivity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import android.widget.TextView;
public class ActivityMain extends TabActivity
{
private TabHost m_TabHost = null;
@Override
public void onCreate (Bundle bundle)
{
super.onCreate (bundle);
setContentView (R.layout.custom_menu_bar);
m_TabHost = getTabHost ();
setupViews ();
m_TabHost.setCurrentTab (0);
}
private static View createTabView (Context context, String title, int iconId)
{
View view = null;
TextView titleTextView = null;
ImageView iconImageView = null;
view = LayoutInflater.from (context).inflate (R.layout.custom_tab, null);
titleTextView = (TextView) view.findViewById (R.id.CustomTabText);
iconImageView = (ImageView) view.findViewById (R.id.CustomTabIcon);
titleTextView.setText (title);
iconImageView.setImageResource (iconId);
return view;
}
private void addActivityTab (int titleId, int iconId, Intent intent)
{
View tabView = null;
String title = null;
TabSpec tabSpec = null;
title = (String) getText (titleId);
tabView = createTabView (m_TabHost.getContext (), title, iconId);
tabSpec = m_TabHost.newTabSpec (title);
tabSpec.setIndicator (tabView);
tabSpec.setContent (intent);
m_TabHost.addTab (tabSpec);
}
private void setupViews ()
{
addActivityTab (R.string.menuRecord, R.drawable.button_record, new Intent (this , ActivityRecord.class));
addActivityTab (R.string.menuUpload, R.drawable.button_upload, new Intent (this , ActivityUpload.class));
}
}
Java Source Code List com.facebook.android.AsyncFacebookRunner.java com.facebook.android.BaseDialogListener.java com.facebook.android.BaseRequestListener.java com.facebook.android.DialogError.java com.facebook.android.FQLQuery.java com.facebook.android.FacebookError.java com.facebook.android.FacebookFunctions.java com.facebook.android.Facebook.java com.facebook.android.FbDialog.java com.facebook.android.FieldsConnectionsDialog.java com.facebook.android.FriendsGetProfilePics.java com.facebook.android.FriendsList.java com.facebook.android.GraphExplorer.java com.facebook.android.IntentUriHandler.java com.facebook.android.LoginButton.java com.facebook.android.PermissionsDialog.java com.facebook.android.Places.java com.facebook.android.SessionEvents.java com.facebook.android.SessionStore.java com.facebook.android.TokenRefreshDialog.java com.facebook.android.UpdateStatusResultDialog.java com.facebook.android.UploadPhotoResultDialog.java com.facebook.android.Util.java com.facebook.android.Utility.java com.googlecode.android.widgets.DateSlider.AlternativeDateSlider.java com.googlecode.android.widgets.DateSlider.CustomDateSlider.java com.googlecode.android.widgets.DateSlider.DateSlider.java com.googlecode.android.widgets.DateSlider.DateTimeSlider.java com.googlecode.android.widgets.DateSlider.DefaultDateSlider.java com.googlecode.android.widgets.DateSlider.MonthYearDateSlider.java com.googlecode.android.widgets.DateSlider.ScrollLayout.java com.googlecode.android.widgets.DateSlider.TimeSlider.java com.googlecode.android.widgets.DateSlider.TimeView.java com.renaultsport.heartrate.ActivityMain.java com.renaultsport.heartrate.ActivityRecord.java com.renaultsport.heartrate.ActivitySplash.java com.renaultsport.heartrate.ActivityUpload.java com.renaultsport.heartrate.ActivityVideoReader.java com.renaultsport.heartrate.ActivityWarning.java com.renaultsport.heartrate.MainApplication.java com.renaultsport.heartrate.utils.CaptureCamera.java com.renaultsport.heartrate.utils.ClientThread.java com.renaultsport.heartrate.utils.Constants.java com.renaultsport.heartrate.utils.RunEncoder.java team.stride.tabs.TabGroupActivity.java