android.support.v7.app.ActionBar.LayoutParams的实例源码

项目:boohee_v5.6    文件:DietSportCalendarActivity.java   
private void initToolsBar() {
    View toolbar_diet_sport = LayoutInflater.from(this).inflate(R.layout.ov,null);
    this.tv_date = (TextView) toolbar_diet_sport.findViewById(R.id.tv_date);
    this.iv_previous = (ImageView) toolbar_diet_sport.findViewById(R.id.iv_previous);
    this.iv_next = (ImageView) toolbar_diet_sport.findViewById(R.id.iv_next);
    this.iv_previous.setOnClickListener(this.mOnIndicator);
    this.iv_next.setOnClickListener(this.mOnIndicator);
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(toolbar_diet_sport,new LayoutParams(-1,-1));
    this.tv_date.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            if (DietSportCalendarActivity.this.dietPopView.isShowing()) {
                DietSportCalendarActivity.this.dietPopView.dismiss();
                return;
            }
            MobclickAgent.onEvent(DietSportCalendarActivity.this.ctx,Event
                    .tool_foodandsport_calendar);
            DietSportCalendarActivity.this.dietPopView.show();
        }
    });
}
项目:boohee_v5.6    文件:GoodsDetailActivity.java   
private void initActionbar() {
    View view_tab = LayoutInflater.from(this).inflate(R.layout.h1,null);
    this.mSlidingTab = (PagerSlidingTabStrip) view_tab.findViewById(R.id.sliding_tabs);
    LayoutParams layoutParams = new LayoutParams(-2,-1);
    layoutParams.gravity = GravityCompat.END;
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(view_tab,layoutParams);
    this.mSlidingTab.setViewPager(this.viewpager);
    this.mSlidingTab.setOnPageChangeListener(new SimpleOnPageChangeListener() {
        public void onPageSelected(int position) {
            super.onPageSelected(position);
            if (position == 1 && !GoodsDetailActivity.this.isSecondLoad) {
                GoodsDetailActivity.this.goodsPostsFragment.loadFirst();
                GoodsDetailActivity.this.isSecondLoad = true;
            }
        }
    });
}
项目:FMTech    文件:Toolbar.java   
public final void ensureMenuView()
{
  if (this.mMenuView == null)
  {
    this.mMenuView = new ActionMenuView(getContext());
    this.mMenuView.setPopupTheme(this.mPopupTheme);
    this.mMenuView.setOnMenuItemClickListener(this.mMenuViewItemClickListener);
    ActionMenuView localActionMenuView = this.mMenuView;
    MenuPresenter.Callback localCallback = this.mActionMenuPresenterCallback;
    MenuBuilder.Callback localCallback1 = this.mMenuBuilderCallback;
    localActionMenuView.mActionMenuPresenterCallback = localCallback;
    localActionMenuView.mMenuBuilderCallback = localCallback1;
    LayoutParams localLayoutParams = new LayoutParams();
    localLayoutParams.gravity = (0x800005 | 0x70 & this.mButtonGravity);
    this.mMenuView.setLayoutParams(localLayoutParams);
    addSystemView(this.mMenuView,false);
  }
}
项目:boohee_v5.6    文件:FriendShipActivity.java   
private void initView() {
    this.mViewPager = (ViewPager) findViewById(R.id.viewpager);
    this.mViewPager.setAdapter(new MainPagerAdapter(getSupportFragmentManager(),this
            .mContentFragments));
    this.mCustomView = LayoutInflater.from(this).inflate(R.layout.lz,null);
    this.mSlidingTab = (PagerSlidingTabStrip) this.mCustomView.findViewById(R.id.sliding_tabs);
    this.mSlidingTab.setViewPager(this.mViewPager);
    this.mViewPager.setCurrentItem(this.position);
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    LayoutParams layoutParams = new LayoutParams(-2,-1);
    layoutParams.gravity = GravityCompat.END;
    getSupportActionBar().setCustomView(this.mCustomView,layoutParams);
}
项目:boohee_v5.6    文件:SearchSportActivity.java   
private void initToolsBar() {
    this.mCustomView = LayoutInflater.from(this).inflate(R.layout.mo,null);
    this.et_search = (EditText) this.mCustomView.findViewById(R.id.et_search);
    this.iv_clear = (ImageView) this.mCustomView.findViewById(R.id.view_clear);
    this.iv_search = (ImageView) this.mCustomView.findViewById(R.id.view_scan);
    this.et_search.setHint(R.string.a3g);
    this.iv_search.setImageDrawable(getResources().getDrawable(R.drawable.a55));
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(this.mCustomView,-1));
}
项目:boohee_v5.6    文件:CookSearchActivity.java   
private void initToolsBar() {
    this.mCustomView = LayoutInflater.from(this).inflate(R.layout.mo,null);
    this.et_search = (EditText) this.mCustomView.findViewById(R.id.et_search);
    this.iv_clear = (ImageView) this.mCustomView.findViewById(R.id.view_clear);
    this.iv_search = (ImageView) this.mCustomView.findViewById(R.id.view_scan);
    this.iv_search.setVisibility(8);
    this.et_search.setHint("请输入食材名称");
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(this.mCustomView,-1));
}
项目:boohee_v5.6    文件:SearchFoodActivity.java   
private void initToolsBar() {
    this.mCustomView = LayoutInflater.from(this).inflate(R.layout.mo,null);
    this.et_search = (EditText) this.mCustomView.findViewById(R.id.et_search);
    this.iv_clear = (ImageView) this.mCustomView.findViewById(R.id.view_clear);
    this.iv_search = (ImageView) this.mCustomView.findViewById(R.id.view_scan);
    this.et_search.setHint(R.string.a3f);
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(this.mCustomView,-1));
}
项目:boohee_v5.6    文件:DietChartActivity.java   
private void initActionbar() {
    View actionBar = LayoutInflater.from(this).inflate(R.layout.f1,null);
    LayoutParams layoutParams = new LayoutParams(-2,-1);
    layoutParams.gravity = GravityCompat.END;
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(actionBar,layoutParams);
}
项目:boohee_v5.6    文件:CopyRecordActivity.java   
private void initToolsBar() {
    View toolbar_diet_sport = LayoutInflater.from(this).inflate(R.layout.n5,null);
    ((TextView) toolbar_diet_sport.findViewById(R.id.txt_date)).setText(TextUtils.isEmpty
            (this.record_on) ? "" : this.record_on);
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    LayoutParams layoutParams = new LayoutParams(-1,-1);
    layoutParams.setMargins(0,ViewUtils.dip2px(this.activity,48.0f),0);
    getSupportActionBar().setCustomView(toolbar_diet_sport,layoutParams);
}
项目:boohee_v5.6    文件:WeightRecordActivity.java   
private void initView() {
    View view_date_top = LayoutInflater.from(this).inflate(R.layout.om,null);
    this.txt_date = (TextView) view_date_top.findViewById(R.id.txt_date);
    view_date_top.findViewById(R.id.rl_left).setOnClickListener(this);
    view_date_top.findViewById(R.id.rl_right).setOnClickListener(this);
    this.calendarGrid.setOnItemClickListener(this);
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(view_date_top,-1));
    showOpenBleMsg();
}
项目:boohee_v5.6    文件:DimensionRecordActivity.java   
private void initToolsBar() {
    View view_date_top = LayoutInflater.from(this).inflate(R.layout.om,null);
    this.txt_date = (TextView) view_date_top.findViewById(R.id.txt_date);
    view_date_top.findViewById(R.id.rl_left).setOnClickListener(this);
    view_date_top.findViewById(R.id.rl_right).setOnClickListener(this);
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(view_date_top,-1));
}
项目:boohee_v5.6    文件:PeriodCalendarActivity.java   
private void initToolsBar() {
    View view_date_top = LayoutInflater.from(this).inflate(R.layout.om,null);
    this.txt_date = (TextView) view_date_top.findViewById(R.id.txt_date);
    view_date_top.findViewById(R.id.rl_left).setOnClickListener(this.dateClickListener);
    view_date_top.findViewById(R.id.rl_right).setOnClickListener(this.dateClickListener);
    getSupportActionBar().setDisplayShowCustomEnabled(true);
    getSupportActionBar().setCustomView(view_date_top,-1));
}
项目:crockpod    文件:CrockpodActivity.java   
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
    View view = getLayoutInflater().inflate(R.layout.crockpod_actionbar,null);
    LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
    getSupportActionBar().setCustomView(view,layoutParams);
    Toolbar parent = (Toolbar) view.getParent();
    parent.setContentInsetsAbsolute(0,0);
}
项目:FMTech    文件:Toolbar.java   
private void addCustomViewsWithGravity(List<View> paramList,int paramInt)
{
  int i = 1;
  if (ViewCompat.getLayoutDirection(this) == i) {}
  int j;
  int k;
  for (;;)
  {
    j = getChildCount();
    k = GravityCompat.getAbsoluteGravity(paramInt,ViewCompat.getLayoutDirection(this));
    paramList.clear();
    if (i == 0) {
      break;
    }
    for (int n = j - 1; n >= 0; n--)
    {
      View localView2 = getChildAt(n);
      LayoutParams localLayoutParams2 = (LayoutParams)localView2.getLayoutParams();
      if ((localLayoutParams2.mViewType == 0) && (shouldLayout(localView2)) && (getChildHorizontalGravity(localLayoutParams2.gravity) == k)) {
        paramList.add(localView2);
      }
    }
    i = 0;
  }
  for (int m = 0; m < j; m++)
  {
    View localView1 = getChildAt(m);
    LayoutParams localLayoutParams1 = (LayoutParams)localView1.getLayoutParams();
    if ((localLayoutParams1.mViewType == 0) && (shouldLayout(localView1)) && (getChildHorizontalGravity(localLayoutParams1.gravity) == k)) {
      paramList.add(localView1);
    }
  }
}
项目:FMTech    文件:Toolbar.java   
private void ensureNavButtonView()
{
  if (this.mNavButtonView == null)
  {
    this.mNavButtonView = new ImageButton(getContext(),null,R.attr.toolbarNavigationButtonStyle);
    LayoutParams localLayoutParams = new LayoutParams();
    localLayoutParams.gravity = (0x800003 | 0x70 & this.mButtonGravity);
    this.mNavButtonView.setLayoutParams(localLayoutParams);
  }
}
项目:FMTech    文件:Toolbar.java   
private static LayoutParams generateLayoutParams(ViewGroup.LayoutParams paramLayoutParams)
{
  if ((paramLayoutParams instanceof LayoutParams)) {
    return new LayoutParams((LayoutParams)paramLayoutParams);
  }
  if ((paramLayoutParams instanceof ActionBar.LayoutParams)) {
    return new LayoutParams((ActionBar.LayoutParams)paramLayoutParams);
  }
  if ((paramLayoutParams instanceof ViewGroup.MarginLayoutParams)) {
    return new LayoutParams((ViewGroup.MarginLayoutParams)paramLayoutParams);
  }
  return new LayoutParams(paramLayoutParams);
}
项目:FMTech    文件:Toolbar.java   
private int layoutChildLeft(View paramView,int paramInt1,int[] paramArrayOfInt,int paramInt2)
{
  LayoutParams localLayoutParams = (LayoutParams)paramView.getLayoutParams();
  int i = localLayoutParams.leftMargin - paramArrayOfInt[0];
  int j = paramInt1 + Math.max(0,i);
  paramArrayOfInt[0] = Math.max(0,-i);
  int k = getChildTop(paramView,paramInt2);
  int m = paramView.getMeasuredWidth();
  paramView.layout(j,k,j + m,k + paramView.getMeasuredHeight());
  return j + (m + localLayoutParams.rightMargin);
}
项目:FMTech    文件:Toolbar.java   
private int layoutChildRight(View paramView,int paramInt2)
{
  LayoutParams localLayoutParams = (LayoutParams)paramView.getLayoutParams();
  int i = localLayoutParams.rightMargin - paramArrayOfInt[1];
  int j = paramInt1 - Math.max(0,i);
  paramArrayOfInt[1] = Math.max(0,paramInt2);
  int m = paramView.getMeasuredWidth();
  paramView.layout(j - m,j,k + paramView.getMeasuredHeight());
  return j - (m + localLayoutParams.leftMargin);
}
项目:FMTech    文件:Toolbar.java   
public final boolean expandItemActionView$29f2911(MenuItemImpl paramMenuItemImpl)
{
  Toolbar.access$200(Toolbar.this);
  if (Toolbar.this.mCollapseButtonView.getParent() != Toolbar.this) {
    Toolbar.this.addView(Toolbar.this.mCollapseButtonView);
  }
  Toolbar.this.mExpandedActionView = paramMenuItemImpl.getActionView();
  this.mCurrentExpandedItem = paramMenuItemImpl;
  if (Toolbar.this.mExpandedActionView.getParent() != Toolbar.this)
  {
    Toolbar.LayoutParams localLayoutParams = Toolbar.generateDefaultLayoutParams();
    localLayoutParams.gravity = (0x800003 | 0x70 & Toolbar.this.mButtonGravity);
    localLayoutParams.mViewType = 2;
    Toolbar.this.mExpandedActionView.setLayoutParams(localLayoutParams);
    Toolbar.this.addView(Toolbar.this.mExpandedActionView);
  }
  Toolbar localToolbar = Toolbar.this;
  for (int i = -1 + localToolbar.getChildCount(); i >= 0; i--)
  {
    View localView = localToolbar.getChildAt(i);
    if ((((Toolbar.LayoutParams)localView.getLayoutParams()).mViewType != 2) && (localView != localToolbar.mMenuView))
    {
      localToolbar.removeViewAt(i);
      localToolbar.mHiddenViews.add(localView);
    }
  }
  Toolbar.this.requestLayout();
  paramMenuItemImpl.setActionViewExpanded(true);
  if ((Toolbar.this.mExpandedActionView instanceof CollapsibleActionView)) {
    ((CollapsibleActionView)Toolbar.this.mExpandedActionView).onActionViewExpanded();
  }
  return true;
}
项目:FMTech    文件:Toolbar.java   
public LayoutParams(ViewGroup.MarginLayoutParams paramMarginLayoutParams)
{
  super();
  this.leftMargin = paramMarginLayoutParams.leftMargin;
  this.topMargin = paramMarginLayoutParams.topMargin;
  this.rightMargin = paramMarginLayoutParams.rightMargin;
  this.bottomMargin = paramMarginLayoutParams.bottomMargin;
}
项目:hefesto    文件:Cronometro.java   
public static Cronometro getInstance(Context context){
       if(instance == null) {
           instance = new Cronometro(context);
           instance.setTextColor(ContextCompat.getColor(context,R.color.primary_text));
           instance.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
           instance.setTypeface(Typeface.createFromAsset(context.getAssets(),"fonts/Roboto-Medium.ttf"));
           instance.setGravity(Gravity.END|Gravity.CENTER_VERTICAL);
           instance.setTextSize(TypedValue.COMPLEX_UNIT_SP,16);
           instance.setTextColor(ContextCompat.getColor(context,R.color.accent));
       }
       return instance;
}
项目:OschinaMainFrameWorkWithToolBar    文件:BaseActivity.java   
protected void setTranslucentStatus(boolean on) {
    Window win = getWindow();
    WindowManager.LayoutParams winParams = win.getAttributes();
    final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
    if (on) {
        winParams.flags |= bits;
    } else {
        winParams.flags &= ~bits;
    }
    win.setAttributes(winParams);
}
项目:oschina-app    文件:BaseActivity.java   
@TargetApi(19)
protected void setTranslucentStatus(boolean on) {
    Window win = getWindow();
    WindowManager.LayoutParams winParams = win.getAttributes();
    final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
    if (on) {
        winParams.flags |= bits;
    } else {
        winParams.flags &= ~bits;
    }
    win.setAttributes(winParams);
}
项目:BecauseWaterAndroid    文件:HomeActivity.java   
public void restoreActionBar() {
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayShowTitleEnabled(false);
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowCustomEnabled(true);

    LayoutParams layout = new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
    LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View v = inflater.inflate(R.layout.action_bar_layout,null);
    actionBar.setCustomView(v,layout);
}
项目:boohee_v5.6    文件:ToolbarActionBar.java   
public void setCustomView(View view) {
    setCustomView(view,new LayoutParams(-2,-2));
}
项目:boohee_v5.6    文件:ToolbarActionBar.java   
public void setCustomView(View view,LayoutParams layoutParams) {
    if (view != null) {
        view.setLayoutParams(layoutParams);
    }
    this.mDecorToolbar.setCustomView(view);
}
项目:boohee_v5.6    文件:WindowDecorActionBar.java   
public void setCustomView(View view,LayoutParams layoutParams) {
    view.setLayoutParams(layoutParams);
    this.mDecorToolbar.setCustomView(view);
}
项目:FMTech    文件:Toolbar.java   
protected static LayoutParams generateDefaultLayoutParams()
{
  return new LayoutParams();
}
项目:FMTech    文件:Toolbar.java   
private int getChildTop(View paramView,int paramInt)
{
  LayoutParams localLayoutParams = (LayoutParams)paramView.getLayoutParams();
  int i = paramView.getMeasuredHeight();
  int j;
  int m;
  int n;
  int i1;
  int i2;
  if (paramInt > 0)
  {
    j = (i - paramInt) / 2;
    int k = 0x70 & localLayoutParams.gravity;
    switch (k)
    {
    default: 
      k = 0x70 & this.mGravity;
    }
    switch (k)
    {
    default: 
      m = getPaddingTop();
      n = getPaddingBottom();
      i1 = getHeight();
      i2 = (i1 - m - n - i) / 2;
      if (i2 < localLayoutParams.topMargin) {
        i2 = localLayoutParams.topMargin;
      }
      break;
    }
  }
  for (;;)
  {
    return m + i2;
    j = 0;
    break;
    return getPaddingTop() - j;
    return getHeight() - getPaddingBottom() - i - localLayoutParams.bottomMargin - j;
    int i3 = i1 - n - i - i2 - m;
    if (i3 < localLayoutParams.bottomMargin) {
      i2 = Math.max(0,i2 - (localLayoutParams.bottomMargin - i3));
    }
  }
}
项目:FMTech    文件:Toolbar.java   
protected boolean checkLayoutParams(ViewGroup.LayoutParams paramLayoutParams)
{
  return (super.checkLayoutParams(paramLayoutParams)) && ((paramLayoutParams instanceof LayoutParams));
}
项目:FMTech    文件:Toolbar.java   
public LayoutParams()
{
  super(-2);
  this.gravity = 8388627;
}
项目:FMTech    文件:Toolbar.java   
public LayoutParams(byte paramByte)
{
  super(-2);
  this.gravity = 17;
}
项目:FMTech    文件:Toolbar.java   
public LayoutParams(Context paramContext,AttributeSet paramAttributeSet)
{
  super(paramAttributeSet);
}
项目:FMTech    文件:Toolbar.java   
public LayoutParams(ActionBar.LayoutParams paramLayoutParams)
{
  super();
}
项目:FMTech    文件:Toolbar.java   
public LayoutParams(LayoutParams paramLayoutParams)
{
  super();
  this.mViewType = paramLayoutParams.mViewType;
}
项目:FMTech    文件:Toolbar.java   
public LayoutParams(ViewGroup.LayoutParams paramLayoutParams)
{
  super();
}
项目:digitalocean-swimmer    文件:RecordCreateDialogFragment.java   
@Override
public void onStart() {
    super.onStart();
    getDialog().getWindow().setLayout(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT);
}
项目:digitalocean-swimmer    文件:DropletDetailsDialogFragment.java   
@Override
public void onStart() {
    super.onStart();
    getDialog().getWindow().setLayout(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT);
}
项目:digitalocean-swimmer    文件:DropletResizeDialogFragment.java   
@Override
public void onStart() {
    super.onStart();
    getDialog().getWindow().setLayout(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT);
}
项目:digitalocean-swimmer    文件:DomainDetailsDialogFragment.java   
@Override
public void onStart() {
    super.onStart();
    getDialog().getWindow().setLayout(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT);
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


com.google.gson.internal.bind.ArrayTypeAdapter的实例源码
com.google.gson.JsonSyntaxException的实例源码
com.google.gson.JsonDeserializer的实例源码
com.google.gson.internal.ConstructorConstructor的实例源码
com.google.gson.JsonPrimitive的实例源码
com.google.gson.LongSerializationPolicy的实例源码
com.google.gson.internal.GsonInternalAccess的实例源码
com.google.gson.JsonIOException的实例源码
com.google.gson.internal.StringMap的实例源码
com.google.gson.JsonObject的实例源码
com.google.gson.internal.bind.TimeTypeAdapter的实例源码
com.google.gson.FieldAttributes的实例源码
com.google.gson.internal.bind.TreeTypeAdapter的实例源码
com.google.gson.internal.LinkedHashTreeMap的实例源码
com.google.gson.TypeAdapterFactory的实例源码
com.google.gson.JsonSerializer的实例源码
com.google.gson.FieldNamingPolicy的实例源码
com.google.gson.JsonElement的实例源码
com.google.gson.internal.JsonReaderInternalAccess的实例源码
com.google.gson.TypeAdapter的实例源码