Ejemplo n.º 1
0
 private void init(android.view.View decor)
 {
     mContext    = decor.getContext();
     mActionView = ([email protected])decor.findViewById([email protected]
                                                                              .id.action_bar);
     mContextView = ([email protected])decor.findViewById(
         [email protected]_context_bar);
     mContainerView = ([email protected])decor.findViewById(
         [email protected]_bar_container);
     mSplitView = ([email protected])decor.findViewById([email protected]
                                                                                  .id.split_action_bar);
     if (mActionView == null || mContextView == null || mContainerView == null)
     {
         throw new System.InvalidOperationException(GetType().Name + " can only be used "
                                                    + "with a compatible window decor layout");
     }
     mActionView.setContextView(mContextView);
     mContextDisplayMode = mActionView.isSplitActionBar() ? CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL;
     // Older apps get the home button interaction enabled by default.
     // Newer apps need to enable it explicitly.
     setHomeButtonEnabled(mContext.getApplicationInfo().targetSdkVersion < android.os.Build
                          .VERSION_CODES.ICE_CREAM_SANDWICH);
     setHasEmbeddedTabs(mContext.getResources().getBoolean([email protected][email protected]_bar_embed_tabs
                                                           ));
 }
Ejemplo n.º 2
0
 public virtual void setSplitView([email protected] splitView
                                  )
 {
     mSplitView = splitView;
 }
Ejemplo n.º 3
0
		private void init(android.view.View decor)
		{
			mContext = decor.getContext();
			mActionView = ([email protected])decor.findViewById([email protected]
				.id.action_bar);
			mContextView = ([email protected])decor.findViewById(
				[email protected]_context_bar);
			mContainerView = ([email protected])decor.findViewById(
				[email protected]_bar_container);
			mSplitView = ([email protected])decor.findViewById([email protected]
				.id.split_action_bar);
			if (mActionView == null || mContextView == null || mContainerView == null)
			{
				throw new System.InvalidOperationException(GetType().Name + " can only be used " 
					+ "with a compatible window decor layout");
			}
			mActionView.setContextView(mContextView);
			mContextDisplayMode = mActionView.isSplitActionBar() ? CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL;
			// Older apps get the home button interaction enabled by default.
			// Newer apps need to enable it explicitly.
			setHomeButtonEnabled(mContext.getApplicationInfo().targetSdkVersion < android.os.Build
				.VERSION_CODES.ICE_CREAM_SANDWICH);
			setHasEmbeddedTabs(mContext.getResources().getBoolean([email protected][email protected]_bar_embed_tabs
				));
		}
Ejemplo n.º 4
0
		public virtual void setSplitView([email protected] splitView
			)
		{
			mSplitView = splitView;
		}