第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

Android攻城獅的第一門課(入門篇)

難度入門
時(shí)長(zhǎng) 5小時(shí) 0分
學(xué)習(xí)人數(shù)
綜合評(píng)分9.57
604人評(píng)價(jià) 查看評(píng)價(jià)
9.8 內(nèi)容實(shí)用
9.6 簡(jiǎn)潔易懂
9.3 邏輯清晰
  • 子類控件在LinearLayout中常用到的屬性

    查看全部
    0 采集 收起 來(lái)源:使用線性布局

    2018-05-05

  • UHV

    Android 結(jié)構(gòu)

    https://img1.sycdn.imooc.com//5aed23a80001f79f12670722.jpg


    查看全部
  • src/存放java源代碼

    查看全部
  • LinearLayout常用屬性

    查看全部
    1 采集 收起 來(lái)源:理解線性布局

    2018-05-04

  • 使用RadioGroup和RadioButton

    <RadioGroup
    android:?id="@+id/radioGroup1"
    android:?layout_width="wrap_content"
    android:?layout_height="wrap_content"
    android:?orientation="horizontal"
    >
    ????<RadioButton
    ????android:?id="@+id/radio0"
    ????android:?layout_width="wrap_content"
    ????android:?layout_height="wrap_content"
    ????android:?checked="true"
    ????android:?text="女"?/>
    ????<RadioButton
    ????android:?id="@+id/radio1"
    ????android:?layout_width="wrap_content"
    ????android:?layout_height="wrap_content"
    ????android:?checked="true"
    ????android:?text="男"?/>
    </RadioGroup>


    實(shí)現(xiàn)方式

    import?android.widget.RadioGroup;
    public?class?MainActivity?extends?Activity?implements?OnCheckedChangeListener{
    ????private?RadioGroup?rg;
    ????@Override
    ????protected?void?onCreate(Bundle?savedInstanceState)?{
    ????????????super.onCreate(savedInstanceState);
    ????????????setContentView(R.layout.activity_main);
    ????????????rg?=?(RadioGroup)?findViewById(R.id.radioGroup1);
    ????????????/*
    ?????????????*實(shí)現(xiàn)RadioGroup的監(jiān)聽(tīng)事件
    ?????????????*
    ?????????????*/
    ????????????rg.setOnCheckedChangeListener(this);
    ????????}
    ????????@Override
    ????????public?void?onCheckedChanged(RadioGroup?group,?int?checkedId)?{
    ????????switch?(checkedId)?{
    ????????????case?R.id.radio0:
    ????????????Log.i("tag",?"你是女的");
    ????????????break;
    ????????????case?R.id.radio1:
    ????????????Log.i("tag",?"你是男的");
    ????????????break;
    ????????}
    ????}
    }


    查看全部
  • RadioGroup 和 RadioButton

    RadioButton選中后不能取消


    查看全部
    0 采集 收起 來(lái)源:概述

    2018-05-04

  • 使用checkBox

    布局文件

    <CheckBox
    android:?checked="false"
    android:?id="@+id/checkBox1"
    android:?layout_width="wrap_content"
    android:?layout_height="wrap_content"
    android:?text="籃球"?/>
    <CheckBox
    android:?checked="false"
    android:?id="@+id/checkBox2"
    android:?layout_width="wrap_content"
    android:?layout_height="wrap_content"
    android:?text="足球"?/>
    <CheckBox
    android:?checked="false"
    android:?id="@+id/checkBox3"
    android:?layout_width="wrap_content"
    android:?layout_height="wrap_content"
    android:?text="排球"?/>


    實(shí)現(xiàn)方式

    public?class?MainActivity?extends?Activity?{
    ????private?CheckBox?checkBox;
    ????@Override
    ????protected?void?onCreate(Bundle?savedInstanceState)?{
    ????????super.onCreate(savedInstanceState);
    ????????setContentView(R.layout.activity_main);
    ????????//初始化checkBox
    ????????checkBox?=?(CheckBox)?findViewById(R.id.checkBox1);
    ????????//通過(guò)設(shè)置checkBox的監(jiān)聽(tīng)事件來(lái)對(duì)checkBox是不是被選中(用匿名內(nèi)部類來(lái)實(shí)現(xiàn))
    ????????checkBox.setOnCheckedListener(new?OnCheckedChangeListener()?{
    ????????????@Override
    ????????????public?void?onCheckedChanged(CompoundButton?buttonView,?boolean?isChecked)?{,?
    ????????????????Log.i("tag",?isChecked+"");
    ????????????????//通過(guò)onCheckedChanged來(lái)監(jiān)聽(tīng)當(dāng)前的checkBox是否被選中
    ????????????????if(isChecked)?{
    ????????????????????String?text?=?checkBox.getText().toString();
    ????????????????????Log.i("tag",?text);
    ????????????????}
    ????????????}
    ????????});
    ????}
    }


    查看全部
    1 采集 收起 來(lái)源:使用CheckBox

    2018-05-04

  • CheckBox復(fù)選框

    查看全部
    0 采集 收起 來(lái)源:復(fù)選框CheckBox概述

    2018-05-04

  • ToggleButton按鈕實(shí)現(xiàn)開(kāi)關(guān)效果


    布局文件

    <ToggleButton
    android:?id="@+id/toggleButton1"
    android:?layout_width="match_parent"
    android:?layout_height="wrap_content"
    android:?textOn="開(kāi)"
    android:?textOff="關(guān)"
    >
    </ToggleButton>
    <ImageView
    android:?id="@+id/imageView1"
    android:?layout_width="match_parent"
    android:?layout_height="match_parent"
    android:?background="@drawable/off"
    >
    </lmageView>



    實(shí)現(xiàn)方式

    ——————————

    private?ToggleButton?tb;
    private?ImageView?img;

    ————————

    初始化控件

    tb?=?(ToggleButton)?findViewById(R.id.toggleButton1);
    img?=?(ImageView)?findViewById(R.id.imageView1);

    ————————

    給當(dāng)前的tb設(shè)置監(jiān)聽(tīng)器(用接口的方式實(shí)現(xiàn))

    public?class?MainActivity?extends?Activity?implements?OnCheckedChangeListener


    @Override
    public?void?onCheckedChanged(CompoundButton?buttonView,?boolean?isChecked)?{}
    tb.setOnCheckedChangeListener(this);

    ————————

    @Override
    public?void?onCheckedChanged(CompoundButton?buttonView,?boolean?isChecked)?{
    /*
    *當(dāng)tb被點(diǎn)擊的時(shí)候,當(dāng)前的方法會(huì)執(zhí)行
    *buttonView---代表被點(diǎn)擊控件的本身
    *isChecked---代表被點(diǎn)擊的控件的狀態(tài)
    *當(dāng)點(diǎn)擊這個(gè)tb的時(shí)候,更換img的背景
    */
    img.setBackgroundResource(isChecked?R.drawable.on:R.drawable.off);
    }


    查看全部
  • ToggleButton

    查看全部
    0 采集 收起 來(lái)源:ToggleButton概述

    2018-05-04

  • 使用MultiAutoCompletementTextView實(shí)現(xiàn)自動(dòng)匹配輸入內(nèi)容

    布局文件:

    <MultiAutoCompleteTextView

    android: id="@+id/multiAutoCompleteTextView1"

    android: completionThreshold="3"

    android: layout_width="match_parent"

    android: layout_height="wrap_content"

    android: hint="請(qǐng)輸入你的收件人"

    >

    </MultiAutoCompleteTextView>


    實(shí)現(xiàn)方式:

    ————————————

    第一步:初始化控件

    private MultiAutoCompleteTextView macTextView;


    macTextView = (MultiAutoCompleteTextView)findViewById(R.id.multiAutoCompleteTextView1);


    ————————————

    第二步:需要一個(gè)適配器

    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, ?res);


    ————————————

    第三步:初始化數(shù)據(jù)源——這些數(shù)據(jù)源去匹配文本框輸入的內(nèi)容

    private String[] res = {"beijing1", "beijing2", "beijing3", "shanghai1", "shanghai2"}


    ————————————

    第四步:講adapter與當(dāng)前的MultiAutoCompleteTextView綁定

    macTextView.setAdapter(adapter);

    ————————————

    第五步:設(shè)置分隔符

    設(shè)置以逗號(hào)為分隔符為結(jié)束的符號(hào)

    macTextView.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());


    ————————————






    MultiAutoCompleteTextView與AutoCompleteTextView的區(qū)別:

    act適合用于搜索引擎,不支持多次匹配

    mact適合用于發(fā)送郵件,支持多次匹配


    查看全部
  • MultiAutoCompleteTextView

    查看全部
  • 使用AutoCompleteTextView實(shí)現(xiàn)自動(dòng)匹配輸入的內(nèi)容

    布局文件:

    <AutoCompleteTextView

    android: id="@+id/autoCompleteTextView1"

    android: completionThreshold="3"

    android: layout_width="match_parent"

    android: layout_height="wrap_content"

    android: hit="請(qǐng)輸入你要搜索的關(guān)鍵詞"

    >

    </AutoCompleteTextView>


    ————————————

    第一步:初始化控件

    private AutoCompleteTextView acTextView;


    acTextView = (AutoCompleteTextView) findViewById(R.id.autoCompleteTextView1);

    ————————————

    第二步:需要一個(gè)適配器

    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, ?res);


    ————————————

    第三步:初始化數(shù)據(jù)源—這數(shù)據(jù)源去匹配文本框輸入的內(nèi)容

    private String[] res = {"beijing1", "beijing2", "beijing3", "shanghai1", "shanghai2"}


    ————————————

    第四步:將adapter與當(dāng)前AutoCompleteTextView綁定

    acTextView.setAdapter(adapter);


    查看全部
  • AutoCompleteTextView

    查看全部
    0 采集 收起 來(lái)源:AutoCompleteTextView概述

    2018-05-04

  • 單行顯示文本

    android: singleLine="true"

    跑馬燈實(shí)現(xiàn)方法(一、用在單個(gè)文本)

    android: ellipsize="marquee"

    android: focusable="true"

    android: focusableInTouchMode="true"

    跑馬燈實(shí)現(xiàn)方法(二、可以用于多個(gè)文本)

    新建自定義控件類(如圖)


    查看全部

舉報(bào)

0/150
提交
取消
課程須知
Android應(yīng)用大部分是使用Java語(yǔ)言進(jìn)行開(kāi)發(fā)的,本門課程同樣使用的是Java語(yǔ)言,所以,在學(xué)習(xí)本門課程前必須掌握J(rèn)ava的基礎(chǔ)語(yǔ)法以及面向?qū)ο缶幊?,同時(shí)要求童鞋們對(duì)Android應(yīng)用有簡(jiǎn)單的認(rèn)識(shí),如不了解不妨度娘一下哦
老師告訴你能學(xué)到什么?
1、android環(huán)境搭建 2、android應(yīng)用程序框架的認(rèn)識(shí) 3、android基礎(chǔ)控件的運(yùn)用 4、android的不同布局形式

微信掃碼,參與3人拼團(tuán)

微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

友情提示:

您好,此課程屬于遷移課程,您已購(gòu)買該課程,無(wú)需重復(fù)購(gòu)買,感謝您對(duì)慕課網(wǎng)的支持!