本文整理匯總了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();
}
示例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);
}
示例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);
}
}
});
}