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


Java LinearLayout.setSelected方法代码示例

本文整理汇总了Java中android.widget.LinearLayout.setSelected方法的典型用法代码示例。如果您正苦于以下问题:Java LinearLayout.setSelected方法的具体用法?Java LinearLayout.setSelected怎么用?Java LinearLayout.setSelected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.LinearLayout的用法示例。


在下文中一共展示了LinearLayout.setSelected方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onTabSelect

import android.widget.LinearLayout; //导入方法依赖的package包/类
/**
 * 切换tab页
 * @param itemLayout
 */
public void onTabSelect(LinearLayout itemLayout) {
    int id = itemLayout.getId();
    FragmentManager manager = getSupportFragmentManager();
    FragmentTransaction transaction = manager.beginTransaction();
    hideFragments(manager, transaction);

    //下面图标颜色变化
    for (int i = 0; i < mLayouts.length; i++) {
        mLayouts[i].setSelected(false);
    }
    itemLayout.setSelected(true);

    if (id == R.id.layout_home) {
        selectedFragment(transaction, mHomeFragment, Main0Fragment.class, FRAGMENT_TAG_HOME);
    } else if (id == R.id.layout_categorize) {
        selectedFragment(transaction, mCategorizeFragment, Main1Fragment.class, FRAGMENT_TAG_Categorize);
    }  else if (id == R.id.layout_more) {
        selectedFragment(transaction, mPersonFragment, Main2Fragment.class, FRAGMENT_TAG_PERSON);
    }
    transaction.commit();
}
 
开发者ID:Break369,项目名称:MyLife,代码行数:26,代码来源:MainActivity.java

示例2: initTiming

import android.widget.LinearLayout; //导入方法依赖的package包/类
private void initTiming() {
    dayMonday = (LinearLayout) findViewById(R.id.dayMonday);
    dayTuesday = (LinearLayout) findViewById(R.id.dayTuesday);
    dayWednesday = (LinearLayout) findViewById(R.id.dayWednesday);
    dayThursday = (LinearLayout) findViewById(R.id.dayThursday);
    dayFriday = (LinearLayout) findViewById(R.id.dayFriday);
    daySaturday = (LinearLayout) findViewById(R.id.daySaturday);
    daySunday = (LinearLayout) findViewById(R.id.daySunday);

    timingMonday = (TextView) findViewById(R.id.timingMonday);
    timingTuesday = (TextView) findViewById(R.id.timingTuesday);
    timingWednesday = (TextView) findViewById(R.id.timingWednesday);
    timingThursday = (TextView) findViewById(R.id.timingThursday);
    timingFriday = (TextView) findViewById(R.id.timingFriday);
    timingSaturday = (TextView) findViewById(R.id.timingSaturday);
    timingSunday = (TextView) findViewById(R.id.timingSunday);

    dayMonday.setSelected(false);
    dayTuesday.setSelected(false);
    dayWednesday.setSelected(false);
    dayThursday.setSelected(false);
    dayFriday.setSelected(false);
    daySaturday.setSelected(false);
    daySunday.setSelected(false);
}
 
开发者ID:PacktPublishing,项目名称:Expert-Android-Programming,代码行数:26,代码来源:PlaceDetailActivity.java

示例3: initView

import android.widget.LinearLayout; //导入方法依赖的package包/类
private void initView() {
        ll_message = (LinearLayout) findViewById(R.id.ll_message);
        ll_service = (LinearLayout) findViewById(R.id.ll_service);
        ll_outget = (LinearLayout) findViewById(R.id.ll_outget);
        ll_bestPro = (LinearLayout) findViewById(R.id.ll_bestpro);
        ll_promotion = (LinearLayout) findViewById(R.id.ll_promotion);

        serviceLabel = (TextView) findViewById(R.id.serviceLabel);
        outgetLabel = (TextView) findViewById(R.id.outgetLabel);
        bestproLabel = (TextView) findViewById(R.id.bestproLabel);
        promotionLabel = (TextView) findViewById(R.id.promotionLabel);

        platsview = (TextView) findViewById(R.id.plats);
        paidAmt = (TextView) findViewById(R.id.paidAmt);
        originalTotalAmt = (TextView) findViewById(R.id.originalTotalAmt);
        zhekou = (TextView) findViewById(R.id.zhekou);
        shadowView = (ImageView) findViewById(R.id.shadowView);
        shadowView.setOnClickListener(this);
        shadowView.setVisibility(View.GONE);
        findViewById(R.id.rootpan).setOnClickListener(this);
        ll_message.setOnClickListener(this);
        ll_service.setOnClickListener(this);
        ll_outget.setOnClickListener(this);
        ll_promotion.setOnClickListener(this);
        ll_bestPro.setOnClickListener(this);
        ll_message.setSelected(true);
        OrderDetailFragment.setActionListener(new OrderDetailFragment.TransModelAction() {
            @Override
            public void send(QuickFixModel model) {
                platsview.setText(model.plates);
//                paidAmt.setText(model.paidAmt);
//                originalTotalAmt.setText(model.originalTotalAmt);
//                if (model.apAmt != null && model.originalTotalAmt != null)
//                    zhekou.setText((Double.parseDouble(model.originalTotalAmt) - Double.parseDouble(model.apAmt)) + "");

                // 企业工单不允许显示促销
                if ( model.orderCustType.equals("1")) {
                    setProPluginVisible(GONE);
                }
                // 返修单不允许显示促销,并且则托外、精品不允许添加
                //08.05 lyy 返修订单不允许有托外、精品和促销!
                if (model.orderType.equals("2") ) {
                    setProPluginVisible(GONE);
                    setBestProPluginVisible(GONE);
                    setOutgetPluginVisible(GONE);
                }
                if (model.orderType.equals("4")) {
                    setProPluginVisible(GONE);
                    setBestProPluginVisible(GONE);
                    setOutgetPluginVisible(GONE);
                }
            }
        });

    }
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:56,代码来源:QuickPanelPlugin.java


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