public static boolean isHoneycombTablet(Context context) { return isHoneycomb() && isTablet(context); } }
/** * Factory method for creating {@link ActivityHelper} objects for a given * activity. Depending on which device the app is running, either a basic * helper or Honeycomb-specific helper will be returned. */ public static ActivityHelper createInstance(Activity activity) { return UIUtils.isHoneycomb() ? new ActivityHelperHoneycomb(activity) : new ActivityHelper(activity); }
private void showDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); View view = LayoutInflater.from(this).inflate(R.layout.infoapropos, null); TextView textView = (TextView) view.findViewById(R.id.textAPropos); Spanned spanned = Html.fromHtml(getString(R.string.dialogAPropos)); if (UIUtils.isHoneycomb()) { textView.setTextColor(AbstractTransportsApplication.getTextColor(this)); } textView.setText(spanned, TextView.BufferType.SPANNABLE); textView.setMovementMethod(LinkMovementMethod.getInstance()); builder.setView(view); builder.setTitle(getString(R.string.titleTransportsBordeaux, Version.getVersionCourante(getApplicationContext()))); builder.setCancelable(false); builder.setNeutralButton(getString(R.string.Terminer), new TransportsBordeaux.TerminerClickListener()); builder.create().show(); }
View alertView = LayoutInflater.from(PreferencesBordeaux.this).inflate(R.layout.infoapropos, null); TextView textView = (TextView) alertView.findViewById(R.id.textAPropos); if (UIUtils.isHoneycomb()) { textView.setTextColor(AbstractTransportsApplication.getTextColor(this));
public void addTab(TabHost.TabSpec tabSpec, Class<?> clss, Bundle args, String title) { if (UIUtils.isHoneycomb()) { tabSpec.setIndicator(title); } else { View view = LayoutInflater.from(mContext).inflate(R.layout.tabs_bg, null); TextView tv = (TextView) view.findViewById(R.id.tabsText); tv.setText(title); tv.setTextColor(AbstractTransportsApplication.getTextColor(mContext)); tabSpec.setIndicator(view); } tabSpec.setContent(dummyTabFactory); TabInfo info = new TabInfo(clss, args); mTabs.add(info); mTabHost.addTab(tabSpec); notifyDataSetChanged(); }
public void invalidateOptionsMenu() { if (UIUtils.isHoneycomb()) { CompatUtil.invalidateOptionsMenu(mActivity); } else if (mActivity instanceof ChangeIconActionBar) { final ViewGroup actionBar = getActionBarCompat(); if (actionBar == null) { return; } for (int i = 0; i < actionBar.getChildCount(); i++) { View view = actionBar.getChildAt(i); if (view instanceof ImageButton) { ((ChangeIconActionBar) mActivity).changeIconActionBar((ImageButton) view); } } actionBar.invalidate(); } }
View view = LayoutInflater.from(this).inflate(R.layout.infoapropos, null); TextView textView = (TextView) view.findViewById(R.id.textAPropos); if (UIUtils.isHoneycomb()) { textView.setTextColor(TransportsRennesApplication.getTextColor(this));