列表,个人中心
@@ -81,6 +81,10 @@
|
||||
android:name=".mine.ModifyPsdActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".mine.UpdateUserAccount"
|
||||
android:exported="false" />
|
||||
|
||||
|
||||
|
||||
<provider
|
||||
|
||||
176
app/src/main/assets/country_calling_codes.json
Normal file
@@ -0,0 +1,176 @@
|
||||
[
|
||||
{"code":"AF","name":"阿富汗","dial_code":"+93"},
|
||||
{"code":"AL","name":"阿尔巴尼亚","dial_code":"+355"},
|
||||
{"code":"DZ","name":"阿尔及利亚","dial_code":"+213"},
|
||||
{"code":"AD","name":"安道尔","dial_code":"+376"},
|
||||
{"code":"AO","name":"安哥拉","dial_code":"+244"},
|
||||
{"code":"AG","name":"安提瓜和巴布达","dial_code":"+1-268"},
|
||||
{"code":"AR","name":"阿根廷","dial_code":"+54"},
|
||||
{"code":"AM","name":"亚美尼亚","dial_code":"+374"},
|
||||
{"code":"AU","name":"澳大利亚","dial_code":"+61"},
|
||||
{"code":"AT","name":"奥地利","dial_code":"+43"},
|
||||
{"code":"AZ","name":"阿塞拜疆","dial_code":"+994"},
|
||||
{"code":"BS","name":"巴哈马","dial_code":"+1-242"},
|
||||
{"code":"BH","name":"巴林","dial_code":"+973"},
|
||||
{"code":"BD","name":"孟加拉国","dial_code":"+880"},
|
||||
{"code":"BB","name":"巴巴多斯","dial_code":"+1-246"},
|
||||
{"code":"BY","name":"白俄罗斯","dial_code":"+375"},
|
||||
{"code":"BE","name":"比利时","dial_code":"+32"},
|
||||
{"code":"BZ","name":"伯利兹","dial_code":"+501"},
|
||||
{"code":"BJ","name":"贝宁","dial_code":"+229"},
|
||||
{"code":"BT","name":"不丹","dial_code":"+975"},
|
||||
{"code":"BO","name":"玻利维亚","dial_code":"+591"},
|
||||
{"code":"BA","name":"波斯尼亚和黑塞哥维那","dial_code":"+387"},
|
||||
{"code":"BW","name":"博茨瓦纳","dial_code":"+267"},
|
||||
{"code":"BR","name":"巴西","dial_code":"+55"},
|
||||
{"code":"BN","name":"文莱","dial_code":"+673"},
|
||||
{"code":"BG","name":"保加利亚","dial_code":"+359"},
|
||||
{"code":"BF","name":"布基纳法索","dial_code":"+226"},
|
||||
{"code":"BI","name":"布隆迪","dial_code":"+257"},
|
||||
{"code":"KH","name":"柬埔寨","dial_code":"+855"},
|
||||
{"code":"CM","name":"喀麦隆","dial_code":"+237"},
|
||||
{"code":"CA","name":"加拿大","dial_code":"+1"},
|
||||
{"code":"CV","name":"佛得角","dial_code":"+238"},
|
||||
{"code":"CF","name":"中非共和国","dial_code":"+236"},
|
||||
{"code":"TD","name":"乍得","dial_code":"+235"},
|
||||
{"code":"CL","name":"智利","dial_code":"+56"},
|
||||
{"code":"CN","name":"中国","dial_code":"+86"},
|
||||
{"code":"CO","name":"哥伦比亚","dial_code":"+57"},
|
||||
{"code":"KM","name":"科摩罗","dial_code":"+269"},
|
||||
{"code":"CG","name":"刚果共和国","dial_code":"+242"},
|
||||
{"code":"CD","name":"刚果民主共和国","dial_code":"+243"},
|
||||
{"code":"CR","name":"哥斯达黎加","dial_code":"+506"},
|
||||
{"code":"CI","name":"科特迪瓦","dial_code":"+225"},
|
||||
{"code":"HR","name":"克罗地亚","dial_code":"+385"},
|
||||
{"code":"CU","name":"古巴","dial_code":"+53"},
|
||||
{"code":"CY","name":"塞浦路斯","dial_code":"+357"},
|
||||
{"code":"CZ","name":"捷克","dial_code":"+420"},
|
||||
{"code":"DK","name":"丹麦","dial_code":"+45"},
|
||||
{"code":"DJ","name":"吉布提","dial_code":"+253"},
|
||||
{"code":"DM","name":"多米尼克","dial_code":"+1-767"},
|
||||
{"code":"DO","name":"多米尼加共和国","dial_code":"+1-809"},
|
||||
{"code":"EC","name":"厄瓜多尔","dial_code":"+593"},
|
||||
{"code":"EG","name":"埃及","dial_code":"+20"},
|
||||
{"code":"SV","name":"萨尔瓦多","dial_code":"+503"},
|
||||
{"code":"GQ","name":"赤道几内亚","dial_code":"+240"},
|
||||
{"code":"ER","name":"厄立特里亚","dial_code":"+291"},
|
||||
{"code":"EE","name":"爱沙尼亚","dial_code":"+372"},
|
||||
{"code":"ET","name":"埃塞俄比亚","dial_code":"+251"},
|
||||
{"code":"FJ","name":"斐济","dial_code":"+679"},
|
||||
{"code":"FI","name":"芬兰","dial_code":"+358"},
|
||||
{"code":"FR","name":"法国","dial_code":"+33"},
|
||||
{"code":"GA","name":"加蓬","dial_code":"+241"},
|
||||
{"code":"GM","name":"冈比亚","dial_code":"+220"},
|
||||
{"code":"GE","name":"格鲁吉亚","dial_code":"+995"},
|
||||
{"code":"DE","name":"德国","dial_code":"+49"},
|
||||
{"code":"GH","name":"加纳","dial_code":"+233"},
|
||||
{"code":"GR","name":"希腊","dial_code":"+30"},
|
||||
{"code":"GD","name":"格林纳达","dial_code":"+1-473"},
|
||||
{"code":"GT","name":"危地马拉","dial_code":"+502"},
|
||||
{"code":"GN","name":"几内亚","dial_code":"+224"},
|
||||
{"code":"GY","name":"圭亚那","dial_code":"+592"},
|
||||
{"code":"HT","name":"海地","dial_code":"+509"},
|
||||
{"code":"HN","name":"洪都拉斯","dial_code":"+504"},
|
||||
{"code":"HK","name":"中国香港","dial_code":"+852"},
|
||||
{"code":"HU","name":"匈牙利","dial_code":"+36"},
|
||||
{"code":"IS","name":"冰岛","dial_code":"+354"},
|
||||
{"code":"IN","name":"印度","dial_code":"+91"},
|
||||
{"code":"ID","name":"印度尼西亚","dial_code":"+62"},
|
||||
{"code":"IR","name":"伊朗","dial_code":"+98"},
|
||||
{"code":"IQ","name":"伊拉克","dial_code":"+964"},
|
||||
{"code":"IE","name":"爱尔兰","dial_code":"+353"},
|
||||
{"code":"IL","name":"以色列","dial_code":"+972"},
|
||||
{"code":"IT","name":"意大利","dial_code":"+39"},
|
||||
{"code":"JM","name":"牙买加","dial_code":"+1-876"},
|
||||
{"code":"JP","name":"日本","dial_code":"+81"},
|
||||
{"code":"JO","name":"约旦","dial_code":"+962"},
|
||||
{"code":"KZ","name":"哈萨克斯坦","dial_code":"+7"},
|
||||
{"code":"KE","name":"肯尼亚","dial_code":"+254"},
|
||||
{"code":"KP","name":"朝鲜","dial_code":"+850"},
|
||||
{"code":"KR","name":"韩国","dial_code":"+82"},
|
||||
{"code":"KW","name":"科威特","dial_code":"+965"},
|
||||
{"code":"KG","name":"吉尔吉斯斯坦","dial_code":"+996"},
|
||||
{"code":"LA","name":"老挝","dial_code":"+856"},
|
||||
{"code":"LV","name":"拉脱维亚","dial_code":"+371"},
|
||||
{"code":"LB","name":"黎巴嫩","dial_code":"+961"},
|
||||
{"code":"LS","name":"莱索托","dial_code":"+266"},
|
||||
{"code":"LR","name":"利比里亚","dial_code":"+231"},
|
||||
{"code":"LY","name":"利比亚","dial_code":"+218"},
|
||||
{"code":"LI","name":"列支敦士登","dial_code":"+423"},
|
||||
{"code":"LT","name":"立陶宛","dial_code":"+370"},
|
||||
{"code":"LU","name":"卢森堡","dial_code":"+352"},
|
||||
{"code":"MO","name":"中国澳门","dial_code":"+853"},
|
||||
{"code":"MG","name":"马达加斯加","dial_code":"+261"},
|
||||
{"code":"MW","name":"马拉维","dial_code":"+265"},
|
||||
{"code":"MY","name":"马来西亚","dial_code":"+60"},
|
||||
{"code":"MV","name":"马尔代夫","dial_code":"+960"},
|
||||
{"code":"ML","name":"马里","dial_code":"+223"},
|
||||
{"code":"MT","name":"马耳他","dial_code":"+356"},
|
||||
{"code":"MR","name":"毛里塔尼亚","dial_code":"+222"},
|
||||
{"code":"MU","name":"毛里求斯","dial_code":"+230"},
|
||||
{"code":"MX","name":"墨西哥","dial_code":"+52"},
|
||||
{"code":"MD","name":"摩尔多瓦","dial_code":"+373"},
|
||||
{"code":"MC","name":"摩纳哥","dial_code":"+377"},
|
||||
{"code":"MN","name":"蒙古","dial_code":"+976"},
|
||||
{"code":"ME","name":"黑山","dial_code":"+382"},
|
||||
{"code":"MA","name":"摩洛哥","dial_code":"+212"},
|
||||
{"code":"MZ","name":"莫桑比克","dial_code":"+258"},
|
||||
{"code":"MM","name":"缅甸","dial_code":"+95"},
|
||||
{"code":"NA","name":"纳米比亚","dial_code":"+264"},
|
||||
{"code":"NP","name":"尼泊尔","dial_code":"+977"},
|
||||
{"code":"NL","name":"荷兰","dial_code":"+31"},
|
||||
{"code":"NZ","name":"新西兰","dial_code":"+64"},
|
||||
{"code":"NI","name":"尼加拉瓜","dial_code":"+505"},
|
||||
{"code":"NE","name":"尼日尔","dial_code":"+227"},
|
||||
{"code":"NG","name":"尼日利亚","dial_code":"+234"},
|
||||
{"code":"NO","name":"挪威","dial_code":"+47"},
|
||||
{"code":"OM","name":"阿曼","dial_code":"+968"},
|
||||
{"code":"PK","name":"巴基斯坦","dial_code":"+92"},
|
||||
{"code":"PA","name":"巴拿马","dial_code":"+507"},
|
||||
{"code":"PG","name":"巴布亚新几内亚","dial_code":"+675"},
|
||||
{"code":"PY","name":"巴拉圭","dial_code":"+595"},
|
||||
{"code":"PE","name":"秘鲁","dial_code":"+51"},
|
||||
{"code":"PH","name":"菲律宾","dial_code":"+63"},
|
||||
{"code":"PL","name":"波兰","dial_code":"+48"},
|
||||
{"code":"PT","name":"葡萄牙","dial_code":"+351"},
|
||||
{"code":"QA","name":"卡塔尔","dial_code":"+974"},
|
||||
{"code":"RO","name":"罗马尼亚","dial_code":"+40"},
|
||||
{"code":"RU","name":"俄罗斯","dial_code":"+7"},
|
||||
{"code":"RW","name":"卢旺达","dial_code":"+250"},
|
||||
{"code":"SA","name":"沙特阿拉伯","dial_code":"+966"},
|
||||
{"code":"SN","name":"塞内加尔","dial_code":"+221"},
|
||||
{"code":"RS","name":"塞尔维亚","dial_code":"+381"},
|
||||
{"code":"SG","name":"新加坡","dial_code":"+65"},
|
||||
{"code":"SK","name":"斯洛伐克","dial_code":"+421"},
|
||||
{"code":"SI","name":"斯洛文尼亚","dial_code":"+386"},
|
||||
{"code":"SO","name":"索马里","dial_code":"+252"},
|
||||
{"code":"ZA","name":"南非","dial_code":"+27"},
|
||||
{"code":"ES","name":"西班牙","dial_code":"+34"},
|
||||
{"code":"LK","name":"斯里兰卡","dial_code":"+94"},
|
||||
{"code":"SD","name":"苏丹","dial_code":"+249"},
|
||||
{"code":"SR","name":"苏里南","dial_code":"+597"},
|
||||
{"code":"SE","name":"瑞典","dial_code":"+46"},
|
||||
{"code":"CH","name":"瑞士","dial_code":"+41"},
|
||||
{"code":"SY","name":"叙利亚","dial_code":"+963"},
|
||||
{"code":"TW","name":"中国台湾","dial_code":"+886"},
|
||||
{"code":"TJ","name":"塔吉克斯坦","dial_code":"+992"},
|
||||
{"code":"TZ","name":"坦桑尼亚","dial_code":"+255"},
|
||||
{"code":"TH","name":"泰国","dial_code":"+66"},
|
||||
{"code":"TG","name":"多哥","dial_code":"+228"},
|
||||
{"code":"TO","name":"汤加","dial_code":"+676"},
|
||||
{"code":"TN","name":"突尼斯","dial_code":"+216"},
|
||||
{"code":"TR","name":"土耳其","dial_code":"+90"},
|
||||
{"code":"TM","name":"土库曼斯坦","dial_code":"+993"},
|
||||
{"code":"UG","name":"乌干达","dial_code":"+256"},
|
||||
{"code":"UA","name":"乌克兰","dial_code":"+380"},
|
||||
{"code":"AE","name":"阿联酋","dial_code":"+971"},
|
||||
{"code":"GB","name":"英国","dial_code":"+44"},
|
||||
{"code":"US","name":"美国","dial_code":"+1"},
|
||||
{"code":"UY","name":"乌拉圭","dial_code":"+598"},
|
||||
{"code":"UZ","name":"乌兹别克斯坦","dial_code":"+998"},
|
||||
{"code":"VE","name":"委内瑞拉","dial_code":"+58"},
|
||||
{"code":"VN","name":"越南","dial_code":"+84"},
|
||||
{"code":"YE","name":"也门","dial_code":"+967"},
|
||||
{"code":"ZM","name":"赞比亚","dial_code":"+260"},
|
||||
{"code":"ZW","name":"津巴布韦","dial_code":"+263"}
|
||||
]
|
||||
176
app/src/main/assets/country_calling_codes_ar.json
Normal file
@@ -0,0 +1,176 @@
|
||||
[
|
||||
{"code":"AF","name":"أفغانستان","dial_code":"+93"},
|
||||
{"code":"AL","name":"ألبانيا","dial_code":"+355"},
|
||||
{"code":"DZ","name":"الجزائر","dial_code":"+213"},
|
||||
{"code":"AD","name":"أندورا","dial_code":"+376"},
|
||||
{"code":"AO","name":"أنغولا","dial_code":"+244"},
|
||||
{"code":"AG","name":"أنتيغوا وبربودا","dial_code":"+1-268"},
|
||||
{"code":"AR","name":"الأرجنتين","dial_code":"+54"},
|
||||
{"code":"AM","name":"أرمينيا","dial_code":"+374"},
|
||||
{"code":"AU","name":"أستراليا","dial_code":"+61"},
|
||||
{"code":"AT","name":"النمسا","dial_code":"+43"},
|
||||
{"code":"AZ","name":"أذربيجان","dial_code":"+994"},
|
||||
{"code":"BS","name":"جزر البهاما","dial_code":"+1-242"},
|
||||
{"code":"BH","name":"البحرين","dial_code":"+973"},
|
||||
{"code":"BD","name":"بنغلاديش","dial_code":"+880"},
|
||||
{"code":"BB","name":"بربادوس","dial_code":"+1-246"},
|
||||
{"code":"BY","name":"بيلاروس","dial_code":"+375"},
|
||||
{"code":"BE","name":"بلجيكا","dial_code":"+32"},
|
||||
{"code":"BZ","name":"بليز","dial_code":"+501"},
|
||||
{"code":"BJ","name":"بنين","dial_code":"+229"},
|
||||
{"code":"BT","name":"بوتان","dial_code":"+975"},
|
||||
{"code":"BO","name":"بوليفيا","dial_code":"+591"},
|
||||
{"code":"BA","name":"البوسنة والهرسك","dial_code":"+387"},
|
||||
{"code":"BW","name":"بوتسوانا","dial_code":"+267"},
|
||||
{"code":"BR","name":"البرازيل","dial_code":"+55"},
|
||||
{"code":"BN","name":"بروناي","dial_code":"+673"},
|
||||
{"code":"BG","name":"بلغاريا","dial_code":"+359"},
|
||||
{"code":"BF","name":"بوركينا فاسو","dial_code":"+226"},
|
||||
{"code":"BI","name":"بوروندي","dial_code":"+257"},
|
||||
{"code":"KH","name":"كمبوديا","dial_code":"+855"},
|
||||
{"code":"CM","name":"الكاميرون","dial_code":"+237"},
|
||||
{"code":"CA","name":"كندا","dial_code":"+1"},
|
||||
{"code":"CV","name":"الرأس الأخضر","dial_code":"+238"},
|
||||
{"code":"CF","name":"جمهورية أفريقيا الوسطى","dial_code":"+236"},
|
||||
{"code":"TD","name":"تشاد","dial_code":"+235"},
|
||||
{"code":"CL","name":"تشيلي","dial_code":"+56"},
|
||||
{"code":"CN","name":"الصين","dial_code":"+86"},
|
||||
{"code":"CO","name":"كولومبيا","dial_code":"+57"},
|
||||
{"code":"KM","name":"جزر القمر","dial_code":"+269"},
|
||||
{"code":"CG","name":"الكونغو - برازافيل","dial_code":"+242"},
|
||||
{"code":"CD","name":"الكونغو - كينشاسا","dial_code":"+243"},
|
||||
{"code":"CR","name":"كوستاريكا","dial_code":"+506"},
|
||||
{"code":"CI","name":"ساحل العاج","dial_code":"+225"},
|
||||
{"code":"HR","name":"كرواتيا","dial_code":"+385"},
|
||||
{"code":"CU","name":"كوبا","dial_code":"+53"},
|
||||
{"code":"CY","name":"قبرص","dial_code":"+357"},
|
||||
{"code":"CZ","name":"التشيك","dial_code":"+420"},
|
||||
{"code":"DK","name":"الدانمرك","dial_code":"+45"},
|
||||
{"code":"DJ","name":"جيبوتي","dial_code":"+253"},
|
||||
{"code":"DM","name":"دومينيكا","dial_code":"+1-767"},
|
||||
{"code":"DO","name":"جمهورية الدومينيكان","dial_code":"+1-809"},
|
||||
{"code":"EC","name":"الإكوادور","dial_code":"+593"},
|
||||
{"code":"EG","name":"مصر","dial_code":"+20"},
|
||||
{"code":"SV","name":"السلفادور","dial_code":"+503"},
|
||||
{"code":"GQ","name":"غينيا الاستوائية","dial_code":"+240"},
|
||||
{"code":"ER","name":"إريتريا","dial_code":"+291"},
|
||||
{"code":"EE","name":"إستونيا","dial_code":"+372"},
|
||||
{"code":"ET","name":"إثيوبيا","dial_code":"+251"},
|
||||
{"code":"FJ","name":"فيجي","dial_code":"+679"},
|
||||
{"code":"FI","name":"فنلندا","dial_code":"+358"},
|
||||
{"code":"FR","name":"فرنسا","dial_code":"+33"},
|
||||
{"code":"GA","name":"الغابون","dial_code":"+241"},
|
||||
{"code":"GM","name":"غامبيا","dial_code":"+220"},
|
||||
{"code":"GE","name":"جورجيا","dial_code":"+995"},
|
||||
{"code":"DE","name":"ألمانيا","dial_code":"+49"},
|
||||
{"code":"GH","name":"غانا","dial_code":"+233"},
|
||||
{"code":"GR","name":"اليونان","dial_code":"+30"},
|
||||
{"code":"GD","name":"غرينادا","dial_code":"+1-473"},
|
||||
{"code":"GT","name":"غواتيمالا","dial_code":"+502"},
|
||||
{"code":"GN","name":"غينيا","dial_code":"+224"},
|
||||
{"code":"GY","name":"غيانا","dial_code":"+592"},
|
||||
{"code":"HT","name":"هايتي","dial_code":"+509"},
|
||||
{"code":"HN","name":"هندوراس","dial_code":"+504"},
|
||||
{"code":"HK","name":"هونغ كونغ الصينية (منطقة إدارية خاصة)","dial_code":"+852"},
|
||||
{"code":"HU","name":"هنغاريا","dial_code":"+36"},
|
||||
{"code":"IS","name":"آيسلندا","dial_code":"+354"},
|
||||
{"code":"IN","name":"الهند","dial_code":"+91"},
|
||||
{"code":"ID","name":"إندونيسيا","dial_code":"+62"},
|
||||
{"code":"IR","name":"إيران","dial_code":"+98"},
|
||||
{"code":"IQ","name":"العراق","dial_code":"+964"},
|
||||
{"code":"IE","name":"أيرلندا","dial_code":"+353"},
|
||||
{"code":"IL","name":"إسرائيل","dial_code":"+972"},
|
||||
{"code":"IT","name":"إيطاليا","dial_code":"+39"},
|
||||
{"code":"JM","name":"جامايكا","dial_code":"+1-876"},
|
||||
{"code":"JP","name":"اليابان","dial_code":"+81"},
|
||||
{"code":"JO","name":"الأردن","dial_code":"+962"},
|
||||
{"code":"KZ","name":"كازاخستان","dial_code":"+7"},
|
||||
{"code":"KE","name":"كينيا","dial_code":"+254"},
|
||||
{"code":"KP","name":"كوريا الشمالية","dial_code":"+850"},
|
||||
{"code":"KR","name":"كوريا الجنوبية","dial_code":"+82"},
|
||||
{"code":"KW","name":"الكويت","dial_code":"+965"},
|
||||
{"code":"KG","name":"قيرغيزستان","dial_code":"+996"},
|
||||
{"code":"LA","name":"لاوس","dial_code":"+856"},
|
||||
{"code":"LV","name":"لاتفيا","dial_code":"+371"},
|
||||
{"code":"LB","name":"لبنان","dial_code":"+961"},
|
||||
{"code":"LS","name":"ليسوتو","dial_code":"+266"},
|
||||
{"code":"LR","name":"ليبيريا","dial_code":"+231"},
|
||||
{"code":"LY","name":"ليبيا","dial_code":"+218"},
|
||||
{"code":"LI","name":"ليختنشتاين","dial_code":"+423"},
|
||||
{"code":"LT","name":"ليتوانيا","dial_code":"+370"},
|
||||
{"code":"LU","name":"لوكسمبورغ","dial_code":"+352"},
|
||||
{"code":"MO","name":"منطقة ماكاو الإدارية الخاصة","dial_code":"+853"},
|
||||
{"code":"MG","name":"مدغشقر","dial_code":"+261"},
|
||||
{"code":"MW","name":"ملاوي","dial_code":"+265"},
|
||||
{"code":"MY","name":"ماليزيا","dial_code":"+60"},
|
||||
{"code":"MV","name":"جزر المالديف","dial_code":"+960"},
|
||||
{"code":"ML","name":"مالي","dial_code":"+223"},
|
||||
{"code":"MT","name":"مالطا","dial_code":"+356"},
|
||||
{"code":"MR","name":"موريتانيا","dial_code":"+222"},
|
||||
{"code":"MU","name":"موريشيوس","dial_code":"+230"},
|
||||
{"code":"MX","name":"المكسيك","dial_code":"+52"},
|
||||
{"code":"MD","name":"مولدوفا","dial_code":"+373"},
|
||||
{"code":"MC","name":"موناكو","dial_code":"+377"},
|
||||
{"code":"MN","name":"منغوليا","dial_code":"+976"},
|
||||
{"code":"ME","name":"الجبل الأسود","dial_code":"+382"},
|
||||
{"code":"MA","name":"المغرب","dial_code":"+212"},
|
||||
{"code":"MZ","name":"موزمبيق","dial_code":"+258"},
|
||||
{"code":"MM","name":"ميانمار (بورما)","dial_code":"+95"},
|
||||
{"code":"NA","name":"ناميبيا","dial_code":"+264"},
|
||||
{"code":"NP","name":"نيبال","dial_code":"+977"},
|
||||
{"code":"NL","name":"هولندا","dial_code":"+31"},
|
||||
{"code":"NZ","name":"نيوزيلندا","dial_code":"+64"},
|
||||
{"code":"NI","name":"نيكاراغوا","dial_code":"+505"},
|
||||
{"code":"NE","name":"النيجر","dial_code":"+227"},
|
||||
{"code":"NG","name":"نيجيريا","dial_code":"+234"},
|
||||
{"code":"NO","name":"النرويج","dial_code":"+47"},
|
||||
{"code":"OM","name":"عُمان","dial_code":"+968"},
|
||||
{"code":"PK","name":"باكستان","dial_code":"+92"},
|
||||
{"code":"PA","name":"بنما","dial_code":"+507"},
|
||||
{"code":"PG","name":"بابوا غينيا الجديدة","dial_code":"+675"},
|
||||
{"code":"PY","name":"باراغواي","dial_code":"+595"},
|
||||
{"code":"PE","name":"بيرو","dial_code":"+51"},
|
||||
{"code":"PH","name":"الفلبين","dial_code":"+63"},
|
||||
{"code":"PL","name":"بولندا","dial_code":"+48"},
|
||||
{"code":"PT","name":"البرتغال","dial_code":"+351"},
|
||||
{"code":"QA","name":"قطر","dial_code":"+974"},
|
||||
{"code":"RO","name":"رومانيا","dial_code":"+40"},
|
||||
{"code":"RU","name":"روسيا","dial_code":"+7"},
|
||||
{"code":"RW","name":"رواندا","dial_code":"+250"},
|
||||
{"code":"SA","name":"المملكة العربية السعودية","dial_code":"+966"},
|
||||
{"code":"SN","name":"السنغال","dial_code":"+221"},
|
||||
{"code":"RS","name":"صربيا","dial_code":"+381"},
|
||||
{"code":"SG","name":"سنغافورة","dial_code":"+65"},
|
||||
{"code":"SK","name":"سلوفاكيا","dial_code":"+421"},
|
||||
{"code":"SI","name":"سلوفينيا","dial_code":"+386"},
|
||||
{"code":"SO","name":"الصومال","dial_code":"+252"},
|
||||
{"code":"ZA","name":"جنوب أفريقيا","dial_code":"+27"},
|
||||
{"code":"ES","name":"إسبانيا","dial_code":"+34"},
|
||||
{"code":"LK","name":"سريلانكا","dial_code":"+94"},
|
||||
{"code":"SD","name":"السودان","dial_code":"+249"},
|
||||
{"code":"SR","name":"سورينام","dial_code":"+597"},
|
||||
{"code":"SE","name":"السويد","dial_code":"+46"},
|
||||
{"code":"CH","name":"سويسرا","dial_code":"+41"},
|
||||
{"code":"SY","name":"سوريا","dial_code":"+963"},
|
||||
{"code":"TW","name":"تايوان","dial_code":"+886"},
|
||||
{"code":"TJ","name":"طاجيكستان","dial_code":"+992"},
|
||||
{"code":"TZ","name":"تنزانيا","dial_code":"+255"},
|
||||
{"code":"TH","name":"تايلاند","dial_code":"+66"},
|
||||
{"code":"TG","name":"توغو","dial_code":"+228"},
|
||||
{"code":"TO","name":"تونغا","dial_code":"+676"},
|
||||
{"code":"TN","name":"تونس","dial_code":"+216"},
|
||||
{"code":"TR","name":"تركيا","dial_code":"+90"},
|
||||
{"code":"TM","name":"تركمانستان","dial_code":"+993"},
|
||||
{"code":"UG","name":"أوغندا","dial_code":"+256"},
|
||||
{"code":"UA","name":"أوكرانيا","dial_code":"+380"},
|
||||
{"code":"AE","name":"الإمارات العربية المتحدة","dial_code":"+971"},
|
||||
{"code":"GB","name":"المملكة المتحدة","dial_code":"+44"},
|
||||
{"code":"US","name":"الولايات المتحدة","dial_code":"+1"},
|
||||
{"code":"UY","name":"أورغواي","dial_code":"+598"},
|
||||
{"code":"UZ","name":"أوزبكستان","dial_code":"+998"},
|
||||
{"code":"VE","name":"فنزويلا","dial_code":"+58"},
|
||||
{"code":"VN","name":"فيتنام","dial_code":"+84"},
|
||||
{"code":"YE","name":"اليمن","dial_code":"+967"},
|
||||
{"code":"ZM","name":"زامبيا","dial_code":"+260"},
|
||||
{"code":"ZW","name":"زيمبابوي","dial_code":"+263"}
|
||||
]
|
||||
176
app/src/main/assets/country_calling_codes_en.json
Normal file
@@ -0,0 +1,176 @@
|
||||
[
|
||||
{"code":"AF","name":"Afghanistan","dial_code":"+93"},
|
||||
{"code":"AL","name":"Albania","dial_code":"+355"},
|
||||
{"code":"DZ","name":"Algeria","dial_code":"+213"},
|
||||
{"code":"AD","name":"Andorra","dial_code":"+376"},
|
||||
{"code":"AO","name":"Angola","dial_code":"+244"},
|
||||
{"code":"AG","name":"Antigua & Barbuda","dial_code":"+1-268"},
|
||||
{"code":"AR","name":"Argentina","dial_code":"+54"},
|
||||
{"code":"AM","name":"Armenia","dial_code":"+374"},
|
||||
{"code":"AU","name":"Australia","dial_code":"+61"},
|
||||
{"code":"AT","name":"Austria","dial_code":"+43"},
|
||||
{"code":"AZ","name":"Azerbaijan","dial_code":"+994"},
|
||||
{"code":"BS","name":"Bahamas","dial_code":"+1-242"},
|
||||
{"code":"BH","name":"Bahrain","dial_code":"+973"},
|
||||
{"code":"BD","name":"Bangladesh","dial_code":"+880"},
|
||||
{"code":"BB","name":"Barbados","dial_code":"+1-246"},
|
||||
{"code":"BY","name":"Belarus","dial_code":"+375"},
|
||||
{"code":"BE","name":"Belgium","dial_code":"+32"},
|
||||
{"code":"BZ","name":"Belize","dial_code":"+501"},
|
||||
{"code":"BJ","name":"Benin","dial_code":"+229"},
|
||||
{"code":"BT","name":"Bhutan","dial_code":"+975"},
|
||||
{"code":"BO","name":"Bolivia","dial_code":"+591"},
|
||||
{"code":"BA","name":"Bosnia & Herzegovina","dial_code":"+387"},
|
||||
{"code":"BW","name":"Botswana","dial_code":"+267"},
|
||||
{"code":"BR","name":"Brazil","dial_code":"+55"},
|
||||
{"code":"BN","name":"Brunei","dial_code":"+673"},
|
||||
{"code":"BG","name":"Bulgaria","dial_code":"+359"},
|
||||
{"code":"BF","name":"Burkina Faso","dial_code":"+226"},
|
||||
{"code":"BI","name":"Burundi","dial_code":"+257"},
|
||||
{"code":"KH","name":"Cambodia","dial_code":"+855"},
|
||||
{"code":"CM","name":"Cameroon","dial_code":"+237"},
|
||||
{"code":"CA","name":"Canada","dial_code":"+1"},
|
||||
{"code":"CV","name":"Cape Verde","dial_code":"+238"},
|
||||
{"code":"CF","name":"Central African Republic","dial_code":"+236"},
|
||||
{"code":"TD","name":"Chad","dial_code":"+235"},
|
||||
{"code":"CL","name":"Chile","dial_code":"+56"},
|
||||
{"code":"CN","name":"China","dial_code":"+86"},
|
||||
{"code":"CO","name":"Colombia","dial_code":"+57"},
|
||||
{"code":"KM","name":"Comoros","dial_code":"+269"},
|
||||
{"code":"CG","name":"Congo - Brazzaville","dial_code":"+242"},
|
||||
{"code":"CD","name":"Congo - Kinshasa","dial_code":"+243"},
|
||||
{"code":"CR","name":"Costa Rica","dial_code":"+506"},
|
||||
{"code":"CI","name":"Côte d’Ivoire","dial_code":"+225"},
|
||||
{"code":"HR","name":"Croatia","dial_code":"+385"},
|
||||
{"code":"CU","name":"Cuba","dial_code":"+53"},
|
||||
{"code":"CY","name":"Cyprus","dial_code":"+357"},
|
||||
{"code":"CZ","name":"Czechia","dial_code":"+420"},
|
||||
{"code":"DK","name":"Denmark","dial_code":"+45"},
|
||||
{"code":"DJ","name":"Djibouti","dial_code":"+253"},
|
||||
{"code":"DM","name":"Dominica","dial_code":"+1-767"},
|
||||
{"code":"DO","name":"Dominican Republic","dial_code":"+1-809"},
|
||||
{"code":"EC","name":"Ecuador","dial_code":"+593"},
|
||||
{"code":"EG","name":"Egypt","dial_code":"+20"},
|
||||
{"code":"SV","name":"El Salvador","dial_code":"+503"},
|
||||
{"code":"GQ","name":"Equatorial Guinea","dial_code":"+240"},
|
||||
{"code":"ER","name":"Eritrea","dial_code":"+291"},
|
||||
{"code":"EE","name":"Estonia","dial_code":"+372"},
|
||||
{"code":"ET","name":"Ethiopia","dial_code":"+251"},
|
||||
{"code":"FJ","name":"Fiji","dial_code":"+679"},
|
||||
{"code":"FI","name":"Finland","dial_code":"+358"},
|
||||
{"code":"FR","name":"France","dial_code":"+33"},
|
||||
{"code":"GA","name":"Gabon","dial_code":"+241"},
|
||||
{"code":"GM","name":"Gambia","dial_code":"+220"},
|
||||
{"code":"GE","name":"Georgia","dial_code":"+995"},
|
||||
{"code":"DE","name":"Germany","dial_code":"+49"},
|
||||
{"code":"GH","name":"Ghana","dial_code":"+233"},
|
||||
{"code":"GR","name":"Greece","dial_code":"+30"},
|
||||
{"code":"GD","name":"Grenada","dial_code":"+1-473"},
|
||||
{"code":"GT","name":"Guatemala","dial_code":"+502"},
|
||||
{"code":"GN","name":"Guinea","dial_code":"+224"},
|
||||
{"code":"GY","name":"Guyana","dial_code":"+592"},
|
||||
{"code":"HT","name":"Haiti","dial_code":"+509"},
|
||||
{"code":"HN","name":"Honduras","dial_code":"+504"},
|
||||
{"code":"HK","name":"Hong Kong SAR China","dial_code":"+852"},
|
||||
{"code":"HU","name":"Hungary","dial_code":"+36"},
|
||||
{"code":"IS","name":"Iceland","dial_code":"+354"},
|
||||
{"code":"IN","name":"India","dial_code":"+91"},
|
||||
{"code":"ID","name":"Indonesia","dial_code":"+62"},
|
||||
{"code":"IR","name":"Iran","dial_code":"+98"},
|
||||
{"code":"IQ","name":"Iraq","dial_code":"+964"},
|
||||
{"code":"IE","name":"Ireland","dial_code":"+353"},
|
||||
{"code":"IL","name":"Israel","dial_code":"+972"},
|
||||
{"code":"IT","name":"Italy","dial_code":"+39"},
|
||||
{"code":"JM","name":"Jamaica","dial_code":"+1-876"},
|
||||
{"code":"JP","name":"Japan","dial_code":"+81"},
|
||||
{"code":"JO","name":"Jordan","dial_code":"+962"},
|
||||
{"code":"KZ","name":"Kazakhstan","dial_code":"+7"},
|
||||
{"code":"KE","name":"Kenya","dial_code":"+254"},
|
||||
{"code":"KP","name":"North Korea","dial_code":"+850"},
|
||||
{"code":"KR","name":"South Korea","dial_code":"+82"},
|
||||
{"code":"KW","name":"Kuwait","dial_code":"+965"},
|
||||
{"code":"KG","name":"Kyrgyzstan","dial_code":"+996"},
|
||||
{"code":"LA","name":"Laos","dial_code":"+856"},
|
||||
{"code":"LV","name":"Latvia","dial_code":"+371"},
|
||||
{"code":"LB","name":"Lebanon","dial_code":"+961"},
|
||||
{"code":"LS","name":"Lesotho","dial_code":"+266"},
|
||||
{"code":"LR","name":"Liberia","dial_code":"+231"},
|
||||
{"code":"LY","name":"Libya","dial_code":"+218"},
|
||||
{"code":"LI","name":"Liechtenstein","dial_code":"+423"},
|
||||
{"code":"LT","name":"Lithuania","dial_code":"+370"},
|
||||
{"code":"LU","name":"Luxembourg","dial_code":"+352"},
|
||||
{"code":"MO","name":"Macao SAR China","dial_code":"+853"},
|
||||
{"code":"MG","name":"Madagascar","dial_code":"+261"},
|
||||
{"code":"MW","name":"Malawi","dial_code":"+265"},
|
||||
{"code":"MY","name":"Malaysia","dial_code":"+60"},
|
||||
{"code":"MV","name":"Maldives","dial_code":"+960"},
|
||||
{"code":"ML","name":"Mali","dial_code":"+223"},
|
||||
{"code":"MT","name":"Malta","dial_code":"+356"},
|
||||
{"code":"MR","name":"Mauritania","dial_code":"+222"},
|
||||
{"code":"MU","name":"Mauritius","dial_code":"+230"},
|
||||
{"code":"MX","name":"Mexico","dial_code":"+52"},
|
||||
{"code":"MD","name":"Moldova","dial_code":"+373"},
|
||||
{"code":"MC","name":"Monaco","dial_code":"+377"},
|
||||
{"code":"MN","name":"Mongolia","dial_code":"+976"},
|
||||
{"code":"ME","name":"Montenegro","dial_code":"+382"},
|
||||
{"code":"MA","name":"Morocco","dial_code":"+212"},
|
||||
{"code":"MZ","name":"Mozambique","dial_code":"+258"},
|
||||
{"code":"MM","name":"Myanmar (Burma)","dial_code":"+95"},
|
||||
{"code":"NA","name":"Namibia","dial_code":"+264"},
|
||||
{"code":"NP","name":"Nepal","dial_code":"+977"},
|
||||
{"code":"NL","name":"Netherlands","dial_code":"+31"},
|
||||
{"code":"NZ","name":"New Zealand","dial_code":"+64"},
|
||||
{"code":"NI","name":"Nicaragua","dial_code":"+505"},
|
||||
{"code":"NE","name":"Niger","dial_code":"+227"},
|
||||
{"code":"NG","name":"Nigeria","dial_code":"+234"},
|
||||
{"code":"NO","name":"Norway","dial_code":"+47"},
|
||||
{"code":"OM","name":"Oman","dial_code":"+968"},
|
||||
{"code":"PK","name":"Pakistan","dial_code":"+92"},
|
||||
{"code":"PA","name":"Panama","dial_code":"+507"},
|
||||
{"code":"PG","name":"Papua New Guinea","dial_code":"+675"},
|
||||
{"code":"PY","name":"Paraguay","dial_code":"+595"},
|
||||
{"code":"PE","name":"Peru","dial_code":"+51"},
|
||||
{"code":"PH","name":"Philippines","dial_code":"+63"},
|
||||
{"code":"PL","name":"Poland","dial_code":"+48"},
|
||||
{"code":"PT","name":"Portugal","dial_code":"+351"},
|
||||
{"code":"QA","name":"Qatar","dial_code":"+974"},
|
||||
{"code":"RO","name":"Romania","dial_code":"+40"},
|
||||
{"code":"RU","name":"Russia","dial_code":"+7"},
|
||||
{"code":"RW","name":"Rwanda","dial_code":"+250"},
|
||||
{"code":"SA","name":"Saudi Arabia","dial_code":"+966"},
|
||||
{"code":"SN","name":"Senegal","dial_code":"+221"},
|
||||
{"code":"RS","name":"Serbia","dial_code":"+381"},
|
||||
{"code":"SG","name":"Singapore","dial_code":"+65"},
|
||||
{"code":"SK","name":"Slovakia","dial_code":"+421"},
|
||||
{"code":"SI","name":"Slovenia","dial_code":"+386"},
|
||||
{"code":"SO","name":"Somalia","dial_code":"+252"},
|
||||
{"code":"ZA","name":"South Africa","dial_code":"+27"},
|
||||
{"code":"ES","name":"Spain","dial_code":"+34"},
|
||||
{"code":"LK","name":"Sri Lanka","dial_code":"+94"},
|
||||
{"code":"SD","name":"Sudan","dial_code":"+249"},
|
||||
{"code":"SR","name":"Suriname","dial_code":"+597"},
|
||||
{"code":"SE","name":"Sweden","dial_code":"+46"},
|
||||
{"code":"CH","name":"Switzerland","dial_code":"+41"},
|
||||
{"code":"SY","name":"Syria","dial_code":"+963"},
|
||||
{"code":"TW","name":"Taiwan","dial_code":"+886"},
|
||||
{"code":"TJ","name":"Tajikistan","dial_code":"+992"},
|
||||
{"code":"TZ","name":"Tanzania","dial_code":"+255"},
|
||||
{"code":"TH","name":"Thailand","dial_code":"+66"},
|
||||
{"code":"TG","name":"Togo","dial_code":"+228"},
|
||||
{"code":"TO","name":"Tonga","dial_code":"+676"},
|
||||
{"code":"TN","name":"Tunisia","dial_code":"+216"},
|
||||
{"code":"TR","name":"Turkey","dial_code":"+90"},
|
||||
{"code":"TM","name":"Turkmenistan","dial_code":"+993"},
|
||||
{"code":"UG","name":"Uganda","dial_code":"+256"},
|
||||
{"code":"UA","name":"Ukraine","dial_code":"+380"},
|
||||
{"code":"AE","name":"United Arab Emirates","dial_code":"+971"},
|
||||
{"code":"GB","name":"United Kingdom","dial_code":"+44"},
|
||||
{"code":"US","name":"United States","dial_code":"+1"},
|
||||
{"code":"UY","name":"Uruguay","dial_code":"+598"},
|
||||
{"code":"UZ","name":"Uzbekistan","dial_code":"+998"},
|
||||
{"code":"VE","name":"Venezuela","dial_code":"+58"},
|
||||
{"code":"VN","name":"Vietnam","dial_code":"+84"},
|
||||
{"code":"YE","name":"Yemen","dial_code":"+967"},
|
||||
{"code":"ZM","name":"Zambia","dial_code":"+260"},
|
||||
{"code":"ZW","name":"Zimbabwe","dial_code":"+263"}
|
||||
]
|
||||
@@ -2,7 +2,7 @@ package com.juhabi.birds
|
||||
|
||||
object AppConfig {
|
||||
// const val BASE_URL = "http://47.97.217.123:8081"
|
||||
const val BASE_URL = "http://192.168.1.217:8081/"
|
||||
const val BASE_URL = "http://192.168.0.212:8081/"
|
||||
const val APP_CLIENT_ID = "app"
|
||||
const val APP_USER_TYPE = "app_user"
|
||||
const val CONTENT_LANGUAGE = "zh_CN"
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.widget.EditText
|
||||
import android.widget.ImageView
|
||||
@@ -279,10 +280,12 @@ abstract class BaseActivity<VB : ViewBinding, P : IPresenter<*>> :
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
/** 显示带输入框的弹窗,输入为空时保留弹窗并提示。 */
|
||||
/** 显示带输入框的弹窗,标题、标签、提示文案由调用方传入。 */
|
||||
fun showEditDialog(
|
||||
title: String,
|
||||
hint: String,
|
||||
label: String = "",
|
||||
hint: String = "",
|
||||
tip: String = "",
|
||||
content: String = "",
|
||||
touchOutsideCancel: Boolean = true,
|
||||
cancelText: String = "取消",
|
||||
@@ -291,6 +294,8 @@ abstract class BaseActivity<VB : ViewBinding, P : IPresenter<*>> :
|
||||
) {
|
||||
val view = layoutInflater.inflate(R.layout.dialog_input_text, null)
|
||||
view.findViewById<TextView>(R.id.dialogTitle).text = title
|
||||
bindOptionalText(view.findViewById(R.id.dialogLabel), label)
|
||||
bindOptionalText(view.findViewById(R.id.dialogTip), tip)
|
||||
val input = view.findViewById<EditText>(R.id.dialogInput).apply {
|
||||
this.hint = hint
|
||||
setText(content)
|
||||
@@ -309,7 +314,7 @@ abstract class BaseActivity<VB : ViewBinding, P : IPresenter<*>> :
|
||||
setOnClickListener {
|
||||
val value = input.text.toString().trim()
|
||||
if (value.isEmpty()) {
|
||||
input.error = hint
|
||||
input.error = hint.ifBlank { "请输入内容" }
|
||||
return@setOnClickListener
|
||||
}
|
||||
dialog.dismiss()
|
||||
@@ -321,6 +326,16 @@ abstract class BaseActivity<VB : ViewBinding, P : IPresenter<*>> :
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
/** 文案为空时隐藏对应控件,避免留下空白行。 */
|
||||
private fun bindOptionalText(textView: TextView, text: String) {
|
||||
if (text.isBlank()) {
|
||||
textView.visibility = View.GONE
|
||||
} else {
|
||||
textView.visibility = View.VISIBLE
|
||||
textView.text = text
|
||||
}
|
||||
}
|
||||
|
||||
/** 在屏幕顶部显示权限用途提示弹窗。 */
|
||||
fun showPermissionDialog(title: String, content: String) {
|
||||
permissionDialog?.dismiss()
|
||||
|
||||
@@ -280,10 +280,12 @@ abstract class BaseFragment<VB : ViewBinding, P : IPresenter<*>> : Fragment(), I
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
/** 显示带输入框的弹窗,输入为空时保留弹窗并提示。 */
|
||||
/** 显示带输入框的弹窗,标题、标签、提示文案由调用方传入。 */
|
||||
fun showEditDialog(
|
||||
title: String,
|
||||
hint: String,
|
||||
label: String = "",
|
||||
hint: String = "",
|
||||
tip: String = "",
|
||||
content: String = "",
|
||||
touchOutsideCancel: Boolean = true,
|
||||
cancelText: String = "取消",
|
||||
@@ -292,6 +294,8 @@ abstract class BaseFragment<VB : ViewBinding, P : IPresenter<*>> : Fragment(), I
|
||||
) {
|
||||
val view = layoutInflater.inflate(R.layout.dialog_input_text, null)
|
||||
view.findViewById<TextView>(R.id.dialogTitle).text = title
|
||||
bindOptionalText(view.findViewById(R.id.dialogLabel), label)
|
||||
bindOptionalText(view.findViewById(R.id.dialogTip), tip)
|
||||
val input = view.findViewById<EditText>(R.id.dialogInput).apply {
|
||||
this.hint = hint
|
||||
setText(content)
|
||||
@@ -310,7 +314,7 @@ abstract class BaseFragment<VB : ViewBinding, P : IPresenter<*>> : Fragment(), I
|
||||
setOnClickListener {
|
||||
val value = input.text.toString().trim()
|
||||
if (value.isEmpty()) {
|
||||
input.error = hint
|
||||
input.error = hint.ifBlank { "请输入内容" }
|
||||
return@setOnClickListener
|
||||
}
|
||||
dialog.dismiss()
|
||||
@@ -322,6 +326,16 @@ abstract class BaseFragment<VB : ViewBinding, P : IPresenter<*>> : Fragment(), I
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
/** 文案为空时隐藏对应控件,避免留下空白行。 */
|
||||
private fun bindOptionalText(textView: TextView, text: String) {
|
||||
if (text.isBlank()) {
|
||||
textView.visibility = View.GONE
|
||||
} else {
|
||||
textView.visibility = View.VISIBLE
|
||||
textView.text = text
|
||||
}
|
||||
}
|
||||
|
||||
/** 在屏幕顶部显示权限用途提示弹窗。 */
|
||||
fun showPermissionDialog(title: String, content: String) {
|
||||
permissionDialog?.dismiss()
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.juhabi.birds.device.entity.DeviceEntity
|
||||
import com.juhabi.birds.device.mvp.DeviceContract
|
||||
import com.juhabi.birds.device.mvp.DeviceImpl
|
||||
import com.juhabi.birds.device.mvp.DevicePresenter
|
||||
import kotlin.random.Random
|
||||
|
||||
/**
|
||||
* 绑定设备
|
||||
@@ -51,16 +50,33 @@ class BindDeviceActivity: BaseActivity<BindDeviceLayoutBinding, DevicePresenter>
|
||||
finish()
|
||||
}
|
||||
|
||||
R.id.tv_bind ->{//绑定设备
|
||||
// val imei = "${System.currentTimeMillis()}${Random.nextInt(100).toString().padStart(2, '0')}"
|
||||
// val name = "device001"
|
||||
val imei = "860000000000005"
|
||||
val name = "BM202609160005"
|
||||
presenter?.bindDevice(imei, name)
|
||||
R.id.tv_bind -> {
|
||||
bindDevice()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 校验设备编码和名称非空后,发起绑定请求。 */
|
||||
private fun bindDevice() {
|
||||
val imei = binding.etDeviceCode.text
|
||||
?.toString()
|
||||
?.trim()
|
||||
.orEmpty()
|
||||
val name = binding.etDeviceName.text
|
||||
?.toString()
|
||||
?.trim()
|
||||
.orEmpty()
|
||||
if (imei.isBlank()) {
|
||||
showMessage("请输入设备编码")
|
||||
return
|
||||
}
|
||||
if (name.isBlank()) {
|
||||
showMessage("请输入设备名称")
|
||||
return
|
||||
}
|
||||
presenter?.bindDevice(imei, name)
|
||||
}
|
||||
|
||||
override fun showError(message: String) {
|
||||
showMessage(message)
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.juhabi.birds.device
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.juhabi.birds.R
|
||||
import com.juhabi.birds.device.entity.DeviceEntity
|
||||
|
||||
/** 临时设备列表适配器,后续可根据设计稿替换 item 展示。 */
|
||||
class DeviceAdapter : BaseQuickAdapter<DeviceEntity, BaseViewHolder>(R.layout.device_item) {
|
||||
init {
|
||||
addChildClickViewIds(R.id.img_tips)
|
||||
}
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: DeviceEntity) {
|
||||
holder.setText(R.id.tv_device_name, item.name.ifBlank { "未命名设备" })
|
||||
holder.setText(R.id.tv_device_status, item.signalText.ifBlank { "离线" })
|
||||
holder.setText(R.id.tv_device_no, "设备编号:${item.deviceNo}")
|
||||
holder.setText(R.id.tv_device_imei, "IMEI:${item.imei}")
|
||||
holder.setText(R.id.tv_device_detail, "型号:${item.model ?: "-"} 信号:${item.signalLevel} 头部电量:${item.hoodBattery ?: "-"} 戒指电量:${item.ringBattery ?: "-"}")
|
||||
holder.setText(R.id.tv_device_location, "连接:${item.hoodConnectedText} 地址:${item.address ?: "暂无地址"}")
|
||||
}
|
||||
}
|
||||
@@ -2,16 +2,17 @@ package com.juhabi.birds.device
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.juhabi.birds.R
|
||||
import com.juhabi.birds.base.BaseFragment
|
||||
import com.juhabi.birds.custom.AddDevicePopupWindow
|
||||
import com.juhabi.birds.custom.DeviceActionPopupWindow
|
||||
import com.juhabi.birds.custom.CustomRefreshHeader
|
||||
import com.juhabi.birds.databinding.FragmentHomeBinding
|
||||
import com.juhabi.birds.device.adapter.DeviceAdapter
|
||||
import com.juhabi.birds.device.entity.DeviceEntity
|
||||
import com.juhabi.birds.device.mvp.DeviceContract
|
||||
import com.juhabi.birds.device.mvp.DeviceImpl
|
||||
@@ -19,6 +20,7 @@ import com.juhabi.birds.device.mvp.DevicePresenter
|
||||
import com.juhabi.birds.util.ToastUtil
|
||||
import com.maning.mlkitscanner.scan.MNScanManager
|
||||
import com.maning.mlkitscanner.scan.callback.act.MNScanCallback
|
||||
import com.maning.mlkitscanner.scan.model.MNScanConfig
|
||||
import com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
|
||||
class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
@@ -38,7 +40,6 @@ class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
listOf(
|
||||
binding.tvIndex,
|
||||
binding.imgScan,
|
||||
).forEach { button ->
|
||||
button.setOnClickListener(this)
|
||||
@@ -50,23 +51,29 @@ class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
putSerializable(DeviceDetailActivity.EXTRA_DEVICE, device)
|
||||
})
|
||||
}
|
||||
deviceAdapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
deviceAdapter.setOnItemChildClickListener { _, view, position ->
|
||||
when (view.id) {
|
||||
R.id.img_tips -> {
|
||||
R.id.img_more -> {
|
||||
val device = deviceAdapter.data[position]
|
||||
DeviceActionPopupWindow(requireContext()).show(
|
||||
view,
|
||||
onRename = {//重命名
|
||||
onRename = {
|
||||
showEditDialog(
|
||||
"设备重命名", device.name, click = object : OnDialogClick {
|
||||
title = "重命名设备",
|
||||
label = "设备名称",
|
||||
hint = device.name,
|
||||
tip = "最多支持20个字符,支持中英文、数字和字符。",
|
||||
confirmText = "确认修改",
|
||||
click = object : OnDialogClick {
|
||||
override fun onCancelClick() {
|
||||
}
|
||||
|
||||
override fun onCancelClick() {}
|
||||
override fun onConfirmClick(content: String) {
|
||||
presenter?.renameDevice(device.deviceNo, content)
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
},
|
||||
onUnbind = {//解绑设备
|
||||
showDialogtext(
|
||||
"提示",
|
||||
@@ -87,6 +94,15 @@ class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
}
|
||||
)
|
||||
}
|
||||
R.id.tv_show_map -> {
|
||||
val device = deviceAdapter.data[position]
|
||||
// 没有经纬度时只展示空态,不要把空坐标传给地图
|
||||
if (device.lat.isNullOrBlank() || device.lng.isNullOrBlank()) {
|
||||
showMessage("暂无定位")
|
||||
return@setOnItemChildClickListener
|
||||
}
|
||||
// 地图页后续接入,这里先预留点击入口
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,17 +124,23 @@ class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
|
||||
override fun onClick(view: View) {
|
||||
when(view.id){
|
||||
R.id.tv_index ->{
|
||||
goTo(BindDeviceActivity::class.java,null)
|
||||
}
|
||||
|
||||
//扫一扫:先申请相机和相册权限,授权通过后再拉起扫码页。
|
||||
// 扫码页仅使用相机,隐藏旧库内部的相册入口。
|
||||
R.id.img_scan -> {
|
||||
getMorePermissionRequst(
|
||||
scanPermissions(),
|
||||
"相机和相册权限",
|
||||
"扫一扫功能需要使用相机及访问相册权限",
|
||||
REQUEST_CAMERA_AND_ALBUM
|
||||
AddDevicePopupWindow(requireContext()).show(view,
|
||||
onManualAdd = {
|
||||
// 手动添加:进入绑定设备页
|
||||
goTo(BindDeviceActivity::class.java, null)
|
||||
},
|
||||
onScan = {
|
||||
// 扫一扫:先申请相机权限,授权后再打开扫码页
|
||||
getMorePermissionRequst(
|
||||
scanPermissions(),
|
||||
"相机权限",
|
||||
"扫一扫功能需要使用相机权限",
|
||||
REQUEST_CAMERA_AND_ALBUM
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -206,7 +228,7 @@ class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
}
|
||||
|
||||
|
||||
/** 相机和相册均已授权后,自动打开扫一扫。 */
|
||||
/** 相机授权后打开扫码页,库内相册按钮已关闭。 */
|
||||
override fun onPermissionsGranted(permissions: Array<String>) {
|
||||
startDeviceScan()
|
||||
}
|
||||
@@ -215,36 +237,50 @@ class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
super.onPermissionsDenied(permissions, permanentlyDenied)
|
||||
}
|
||||
|
||||
/** Android 13 及以上申请读图权限,更低版本申请存储读取权限。 */
|
||||
/** 相册入口已隐藏,因此扫码流程只需要相机权限。 */
|
||||
private fun scanPermissions(): Array<String> {
|
||||
val albumPermission = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
Manifest.permission.READ_MEDIA_IMAGES
|
||||
} else {
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE
|
||||
}
|
||||
return arrayOf(Manifest.permission.CAMERA, albumPermission)
|
||||
return arrayOf(Manifest.permission.CAMERA)
|
||||
}
|
||||
|
||||
/** 使用 MNMLKitScanner 默认扫码页识别二维码或条形码。 */
|
||||
private fun startDeviceScan() {
|
||||
MNScanManager.startScan(mContext, object : MNScanCallback {
|
||||
override fun onActivityResult(resultCode: Int, data: Intent) {
|
||||
when (resultCode) {
|
||||
MNScanManager.RESULT_SUCCESS -> {
|
||||
val results = data.getStringArrayListExtra(MNScanManager.INTENT_KEY_RESULT_SUCCESS)
|
||||
val content = results?.filter { it.isNotBlank() }?.joinToString("\n").orEmpty()
|
||||
val config = MNScanConfig.Builder()
|
||||
.isShowPhotoAlbum(false)
|
||||
.builder()
|
||||
|
||||
MNScanManager.startScan(mContext, config, object : MNScanCallback {
|
||||
override fun onActivityResult(resultCode: Int, data: Intent?) {
|
||||
if (!isAdded) {
|
||||
return
|
||||
}
|
||||
// 库把 RESULT_SUCCESS 定义为 0,和系统返回键的 RESULT_CANCELED 相同。
|
||||
// 点关闭会走 RESULT_CANCLE=2 并带回空 Intent;按返回键 data 为 null。
|
||||
when {
|
||||
resultCode == MNScanManager.RESULT_SUCCESS && data != null -> {
|
||||
val results = data.getStringArrayListExtra(
|
||||
MNScanManager.INTENT_KEY_RESULT_SUCCESS
|
||||
)
|
||||
val content = results
|
||||
?.filter { it.isNotBlank() }
|
||||
?.joinToString("\n")
|
||||
.orEmpty()
|
||||
if (content.isBlank()) {
|
||||
ToastUtil.showShort(mContext, "未识别到内容")
|
||||
} else {
|
||||
ToastUtil.showShort(mContext, content)
|
||||
}
|
||||
}
|
||||
MNScanManager.RESULT_FAIL -> {
|
||||
val resultError = data.getStringExtra(MNScanManager.INTENT_KEY_RESULT_ERROR)
|
||||
ToastUtil.showShort(mContext, resultError.takeUnless { it.isNullOrBlank() } ?: "扫码失败")
|
||||
resultCode == MNScanManager.RESULT_FAIL -> {
|
||||
val resultError = data?.getStringExtra(
|
||||
MNScanManager.INTENT_KEY_RESULT_ERROR
|
||||
)
|
||||
ToastUtil.showShort(
|
||||
mContext,
|
||||
resultError.takeUnless { it.isNullOrBlank() } ?: "扫码失败"
|
||||
)
|
||||
}
|
||||
MNScanManager.RESULT_CANCLE -> {
|
||||
ToastUtil.showShort(mContext, getString(R.string.cancel_scan))
|
||||
else -> {
|
||||
// 关闭按钮或系统返回,按取消处理
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.juhabi.birds.device.adapter
|
||||
|
||||
import android.widget.ProgressBar
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.juhabi.birds.R
|
||||
import com.juhabi.birds.device.entity.DeviceEntity
|
||||
|
||||
/** 临时设备列表适配器,后续可根据设计稿替换 item 展示。 */
|
||||
class DeviceAdapter : BaseQuickAdapter<DeviceEntity, BaseViewHolder>(R.layout.device_item) {
|
||||
init {
|
||||
addChildClickViewIds(R.id.img_more)
|
||||
}
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: DeviceEntity) {
|
||||
//设备名字
|
||||
holder.setText(R.id.tv_dev_name, item.name.ifBlank { "未命名设备" })
|
||||
//在线状态
|
||||
if (item.status == "1") {
|
||||
holder.setText(R.id.tv_dev_online_status, "在线")
|
||||
} else {
|
||||
holder.setText(R.id.tv_dev_online_status, "离线")
|
||||
}
|
||||
val statusRes = if (item.status == "1") {
|
||||
R.drawable.shape_device_online_bg
|
||||
} else {
|
||||
R.drawable.shape_device_offline_bg
|
||||
}
|
||||
holder.setBackgroundResource(
|
||||
R.id.tv_dev_online_status,
|
||||
statusRes
|
||||
)
|
||||
|
||||
holder.setText(R.id.tv_dev_number, "IMEI:${item.deviceNo}")
|
||||
|
||||
if (item.status == "1") {
|
||||
// 信号:0 离线、1 弱、2 一般、3 强。资源 id 必须赋给变量才会生效。
|
||||
val imgResource: Int
|
||||
val signalText: String
|
||||
val wifiTextColor: Int
|
||||
if (item.signalLevel == 0) {
|
||||
imgResource = R.mipmap.icon_dev_wifi_offline
|
||||
signalText = "离线"
|
||||
wifiTextColor = R.color.color_999999
|
||||
} else if (item.signalLevel == 1) {
|
||||
imgResource = R.mipmap.icon_dev_wifi_low
|
||||
signalText = "弱"
|
||||
wifiTextColor = R.color.color_e34d59
|
||||
} else if (item.signalLevel == 2) {
|
||||
imgResource = R.mipmap.icon_dev_wifi_mid
|
||||
signalText = "一般"
|
||||
wifiTextColor = R.color.color_ff942a
|
||||
} else {
|
||||
imgResource = R.mipmap.icon_dev_wifi_hight
|
||||
signalText = "强"
|
||||
wifiTextColor = R.color.color_zhu
|
||||
}
|
||||
|
||||
holder.setImageResource(R.id.img_signal, imgResource)
|
||||
holder.setText(R.id.tv_signal_text, signalText)
|
||||
holder.setTextColor(R.id.tv_signal_text,wifiTextColor)
|
||||
holder.setText(
|
||||
R.id.tv_head_foot_connect_status,
|
||||
if (item.hoodConnected == "0") "断开" else "已连接"
|
||||
)
|
||||
}else{
|
||||
holder.setImageResource(R.id.img_signal, R.mipmap.icon_dev_wifi_offline)
|
||||
holder.setText(R.id.tv_signal_text, "离线")
|
||||
holder.setTextColor(R.id.tv_signal_text, R.color.color_999999)
|
||||
holder.setText(
|
||||
R.id.tv_head_foot_connect_status,
|
||||
if (item.hoodConnected == "0") "断开" else "已连接"
|
||||
)
|
||||
}
|
||||
|
||||
holder.setText(R.id.tv_head_power_value, "${item.hoodBattery}%")
|
||||
holder.setText(R.id.tv_foot_power_value, "${item.ringBattery}%")
|
||||
|
||||
// 电量三档:0-30 低,31-70 中,71-100 高
|
||||
val headBattery = (item.hoodBattery ?: 0).coerceIn(0, 100)
|
||||
val footBattery = (item.ringBattery ?: 0).coerceIn(0, 100)
|
||||
val isOnline = item.status == "1"
|
||||
|
||||
if (isOnline) {
|
||||
holder.setImageResource(
|
||||
R.id.img_head_power_icon,
|
||||
getBatteryIcon(
|
||||
battery = headBattery,
|
||||
highIcon = R.mipmap.icon_power_head_high,
|
||||
midIcon = R.mipmap.icon_power_head_mid
|
||||
)
|
||||
)
|
||||
holder.setImageResource(
|
||||
R.id.img_foot_power_icon,
|
||||
getBatteryIcon(
|
||||
battery = footBattery,
|
||||
highIcon = R.mipmap.icon_power_foot_high,
|
||||
midIcon = R.mipmap.icon_power_foot_mid
|
||||
)
|
||||
)
|
||||
} else {
|
||||
// 离线时头套、脚环电量图标统一显示离线态
|
||||
holder.setImageResource(
|
||||
R.id.img_head_power_icon,
|
||||
R.mipmap.icon_dev_power_offline
|
||||
)
|
||||
holder.setImageResource(
|
||||
R.id.img_foot_power_icon,
|
||||
R.mipmap.icon_dev_power_offline
|
||||
)
|
||||
}
|
||||
|
||||
val progressHead = holder.getView<ProgressBar>(R.id.progress_head)
|
||||
val progressFoot = holder.getView<ProgressBar>(R.id.progress_foot)
|
||||
val headProgressRes = if (isOnline) {
|
||||
R.drawable.progress_head_bg
|
||||
} else {
|
||||
R.drawable.progress_offline_bg
|
||||
}
|
||||
val footProgressRes = if (isOnline) {
|
||||
R.drawable.progress_foot_bg
|
||||
} else {
|
||||
R.drawable.progress_offline_bg
|
||||
}
|
||||
// mutate 避免两条进度条共用同一份离线 drawable 状态
|
||||
progressHead.progressDrawable = ContextCompat.getDrawable(
|
||||
context,
|
||||
headProgressRes
|
||||
)?.mutate()
|
||||
progressFoot.progressDrawable = ContextCompat.getDrawable(
|
||||
context,
|
||||
footProgressRes
|
||||
)?.mutate()
|
||||
// 替换 drawable 后进度会被重置,需要重新写入
|
||||
progressHead.max = 100
|
||||
progressHead.progress = headBattery
|
||||
progressFoot.max = 100
|
||||
progressFoot.progress = footBattery
|
||||
|
||||
//tv_location_detail 显示地址
|
||||
holder.setText(R.id.tv_location_detail, item.address)
|
||||
}
|
||||
|
||||
/**
|
||||
* 按电量返回对应档位图标。
|
||||
* 低电量头套、脚环共用 icon_power_low。
|
||||
*/
|
||||
private fun getBatteryIcon(
|
||||
battery: Int,
|
||||
highIcon: Int,
|
||||
midIcon: Int
|
||||
): Int {
|
||||
return when {
|
||||
battery <= BATTERY_LOW_MAX -> R.mipmap.icon_power_low
|
||||
battery <= BATTERY_MID_MAX -> midIcon
|
||||
else -> highIcon
|
||||
}
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val BATTERY_LOW_MAX = 30
|
||||
const val BATTERY_MID_MAX = 70
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,19 @@ package com.juhabi.birds.device.entity
|
||||
import java.io.Serializable
|
||||
|
||||
data class DeviceEntity(
|
||||
val address: String,
|
||||
val deviceNo: String,
|
||||
val hoodBattery: Int?,
|
||||
val hoodConnected: String,
|
||||
val hoodConnectedText: String,
|
||||
val imei: String,
|
||||
val lat: Double?,
|
||||
val lng: Double?,
|
||||
val model: String?,
|
||||
val name: String,
|
||||
val ringBattery: Int?,
|
||||
val signalLevel: Int,
|
||||
val signalText: String,
|
||||
val status: String,
|
||||
val hoodCoverOn: String
|
||||
val address: String = "",
|
||||
val deviceNo: String = "",
|
||||
val hoodBattery: Int? = null,
|
||||
val hoodConnected: String = "",
|
||||
val hoodConnectedText: String = "",
|
||||
val imei: String = "",
|
||||
val lat: String? = null,
|
||||
val lng: String? = null,
|
||||
val model: String? = null,
|
||||
val name: String = "",
|
||||
val ringBattery: Int? = null,
|
||||
val signalLevel: Int = 0,
|
||||
val signalText: String = "",
|
||||
val status: String = "",
|
||||
val hoodCoverOn: String = ""
|
||||
) : Serializable
|
||||
|
||||
@@ -4,11 +4,19 @@ import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.juhabi.birds.AppConfig
|
||||
import com.juhabi.birds.R
|
||||
import com.juhabi.birds.base.BaseActivity
|
||||
import com.juhabi.birds.databinding.RegisterLayoutBinding
|
||||
import com.juhabi.birds.databinding.DialogCountryCodeBinding
|
||||
import com.juhabi.birds.login.adapter.CountryCallingCode
|
||||
import com.juhabi.birds.login.adapter.CountryCodeAdapter
|
||||
import com.juhabi.birds.login.model.UserEntity
|
||||
import com.juhabi.birds.login.mvp.LoginContract
|
||||
import com.juhabi.birds.login.mvp.LoginImpl
|
||||
@@ -47,6 +55,7 @@ class RegisterActivity : BaseActivity<RegisterLayoutBinding, LoginPresenter>(),
|
||||
binding.getCodeButton,
|
||||
binding.confirmButton,
|
||||
binding.includedTitle.imgBack,
|
||||
binding.linearCountry,
|
||||
).forEach { button ->
|
||||
button.setOnClickListener(this)
|
||||
}
|
||||
@@ -59,6 +68,8 @@ class RegisterActivity : BaseActivity<RegisterLayoutBinding, LoginPresenter>(),
|
||||
finish()
|
||||
}
|
||||
|
||||
R.id.linear_country -> showCountryCodeDialog()
|
||||
|
||||
R.id.getCodeButton -> {//获取验证码
|
||||
if (binding.phoneEditText.text.toString().isBlank()) {
|
||||
ToastUtil.showShort(mContext, "手机号不能为空")
|
||||
@@ -109,6 +120,44 @@ class RegisterActivity : BaseActivity<RegisterLayoutBinding, LoginPresenter>(),
|
||||
}
|
||||
}
|
||||
|
||||
private fun showCountryCodeDialog() {
|
||||
val dialogBinding = DialogCountryCodeBinding.inflate(layoutInflater)
|
||||
val dialog = AlertDialog.Builder(this)
|
||||
.setView(dialogBinding.root)
|
||||
.create()
|
||||
|
||||
dialogBinding.countryRecyclerView.apply {
|
||||
layoutManager = LinearLayoutManager(this@RegisterActivity)
|
||||
adapter = CountryCodeAdapter(loadCountryCallingCodes()) { country ->
|
||||
binding.areaCodeButton.text = country.dial_code
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
dialog.setOnShowListener {
|
||||
dialog.window?.apply {
|
||||
setBackgroundDrawableResource(android.R.color.transparent)
|
||||
setLayout(
|
||||
(resources.displayMetrics.widthPixels * 0.88f).toInt(),
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
}
|
||||
}
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
private fun loadCountryCallingCodes(): List<CountryCallingCode> {
|
||||
val language = resources.configuration.locales[0].language
|
||||
val fileName = when (language) {
|
||||
"ar" -> "country_calling_codes_ar.json"
|
||||
"en" -> "country_calling_codes_en.json"
|
||||
else -> "country_calling_codes.json"
|
||||
}
|
||||
val json = assets.open(fileName).bufferedReader().use { it.readText() }
|
||||
val type = object : TypeToken<List<CountryCallingCode>>() {}.type
|
||||
return Gson().fromJson(json, type)
|
||||
}
|
||||
|
||||
override fun showError(message: String) {
|
||||
hideLoading()
|
||||
ToastUtil.showShort(mContext, message)
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.juhabi.birds.login.adapter
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.juhabi.birds.databinding.ItemCountryCodeBinding
|
||||
|
||||
data class CountryCallingCode(
|
||||
val code: String,
|
||||
val name: String,
|
||||
val dial_code: String
|
||||
)
|
||||
|
||||
class CountryCodeAdapter(
|
||||
private val countries: List<CountryCallingCode>,
|
||||
private val onItemClick: (CountryCallingCode) -> Unit
|
||||
) : RecyclerView.Adapter<CountryCodeAdapter.CountryViewHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CountryViewHolder {
|
||||
return CountryViewHolder(
|
||||
ItemCountryCodeBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: CountryViewHolder, position: Int) {
|
||||
holder.bind(countries[position])
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = countries.size
|
||||
|
||||
inner class CountryViewHolder(
|
||||
private val binding: ItemCountryCodeBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
|
||||
fun bind(country: CountryCallingCode) {
|
||||
binding.countryNameTextView.text = country.name
|
||||
binding.countryDialCodeTextView.text = country.dial_code
|
||||
binding.root.setOnClickListener { onItemClick(country) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.juhabi.birds.main
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import androidx.annotation.ColorRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.juhabi.birds.R
|
||||
import com.juhabi.birds.base.BaseActivity
|
||||
@@ -80,12 +79,9 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainPresenter>(),
|
||||
}
|
||||
|
||||
private fun updateTopBarColor(position: Int) {
|
||||
@ColorRes val colorRes = when (position) {
|
||||
PAGE_HOME -> R.color.color_zhu
|
||||
PAGE_MINE -> R.color.color_B85CE6
|
||||
else -> R.color.color_zhu
|
||||
}
|
||||
binding.statusBarView.setBackgroundColor(ContextCompat.getColor(this, colorRes))
|
||||
binding.statusBarView.setBackgroundColor(
|
||||
ContextCompat.getColor(this, R.color.color_zhu)
|
||||
)
|
||||
}
|
||||
|
||||
override fun initData(savedInstanceState: Bundle?) {
|
||||
|
||||
@@ -123,8 +123,8 @@ class MineCenterActivity : BaseActivity<ActivityMineCenterBinding, MinePresenter
|
||||
|
||||
R.id.inputDialogButton -> {
|
||||
showEditDialog(
|
||||
"请输入内容",
|
||||
"请输入测试内容",
|
||||
title = "请输入内容",
|
||||
hint = "请输入测试内容",
|
||||
click = object : OnDialogClick {
|
||||
override fun onCancelClick() {
|
||||
showMessage("已取消输入")
|
||||
@@ -190,13 +190,12 @@ class MineCenterActivity : BaseActivity<ActivityMineCenterBinding, MinePresenter
|
||||
}
|
||||
|
||||
override fun getUserInfoSuccess(userInfo: MineUserInfo) {
|
||||
val user = userInfo.user ?: return showError("个人信息为空")
|
||||
binding.nicknameTextView.text = user.nickName.ifBlank { "未设置昵称" }
|
||||
binding.phoneTextView.text = "手机号:${user.phonenumber.ifBlank { "未绑定" }}"
|
||||
binding.emailTextView.text = "邮箱:${user.email.ifBlank { "未绑定" }}"
|
||||
binding.userIdTextView.text = "用户 ID:${user.userId}"
|
||||
binding.userTypeTextView.text = "用户类型:${user.userType}"
|
||||
binding.loginDateTextView.text = "最近登录:${user.loginDate.ifBlank { "暂无" }}"
|
||||
binding.nicknameTextView.text = userInfo.nickName.ifBlank { "未设置昵称" }
|
||||
binding.phoneTextView.text = "手机号:${userInfo.phoneNumber?.ifBlank { null } ?: "未绑定"}"
|
||||
binding.emailTextView.text = "邮箱:${userInfo.email?.ifBlank { null } ?: "未绑定"}"
|
||||
binding.userIdTextView.text = "账号:${userInfo.userName.ifBlank { "暂无" }}"
|
||||
binding.userTypeTextView.text = "用户类型:${userInfo.userType.ifBlank { "暂无" }}"
|
||||
binding.loginDateTextView.text = "注册时间:${userInfo.createTime.ifBlank { "暂无" }}"
|
||||
}
|
||||
|
||||
override fun showError(message: String) {
|
||||
|
||||
@@ -2,23 +2,27 @@ package com.juhabi.birds.mine
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.juhabi.birds.base.BaseFragment
|
||||
import com.juhabi.birds.databinding.FragmentMineBinding
|
||||
import com.juhabi.birds.mine.model.MineUserInfo
|
||||
import com.juhabi.birds.R
|
||||
import com.juhabi.birds.databinding.MineCenterLayoutBinding
|
||||
import com.juhabi.birds.mine.ModifyPsdActivity
|
||||
import com.juhabi.birds.main.model.AppVersionInfo
|
||||
import com.juhabi.birds.mine.mvp.MineContract
|
||||
import com.juhabi.birds.mine.mvp.MineImpl
|
||||
import com.juhabi.birds.mine.mvp.MinePresenter
|
||||
import com.juhabi.birds.util.manager.UserInfoManager
|
||||
|
||||
/**
|
||||
* 个人中心
|
||||
*/
|
||||
class MineFragment : BaseFragment<FragmentMineBinding, MinePresenter>(),
|
||||
MineContract.MineView {
|
||||
class MineFragment : BaseFragment<MineCenterLayoutBinding, MinePresenter>(),
|
||||
MineContract.MineView, View.OnClickListener {
|
||||
|
||||
override fun createBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentMineBinding {
|
||||
return FragmentMineBinding.inflate(inflater, container, false)
|
||||
override fun createBinding(inflater: LayoutInflater, container: ViewGroup?): MineCenterLayoutBinding {
|
||||
return MineCenterLayoutBinding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun createPresenter(): MinePresenter {
|
||||
@@ -32,11 +36,68 @@ class MineFragment : BaseFragment<FragmentMineBinding, MinePresenter>(),
|
||||
}
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
listOf(
|
||||
binding.linearXgmm,
|
||||
binding.linearGhsj,
|
||||
binding.linearQchc,
|
||||
binding.linearBbxx,
|
||||
binding.linearYsxy,
|
||||
binding.linearYhxy,
|
||||
binding.linearQhyy,
|
||||
binding.linearZxzh,
|
||||
binding.tvLogout,
|
||||
).forEach { button ->
|
||||
button.setOnClickListener(this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(view: View) {
|
||||
when (view.id) {
|
||||
//修改密码
|
||||
R.id.linear_xgmm -> {
|
||||
goTo(ModifyPsdActivity::class.java, null)
|
||||
}
|
||||
|
||||
R.id.linear_ghsj -> {
|
||||
goTo(UpdateUserAccount::class.java, null)
|
||||
}
|
||||
|
||||
|
||||
//退出登录
|
||||
R.id.tv_logout -> {
|
||||
showDialogtext(
|
||||
"退出登录",
|
||||
"确定要退出当前账号吗?",
|
||||
"确定",
|
||||
"取消",
|
||||
object : OnDialogClick {
|
||||
override fun onCancelClick() {
|
||||
}
|
||||
|
||||
override fun onConfirmClick() {
|
||||
// 退出登录接口后续接入
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/** 将个人信息请求结果更新到个人中心页面。 */
|
||||
override fun getUserInfoSuccess(userInfo: MineUserInfo) {
|
||||
showMessage("个人信息获取成功")
|
||||
val displayName = userInfo.userName.ifBlank { "未设置用户名" }
|
||||
val displayAccount = userInfo.phoneNumber
|
||||
?.ifBlank { null }
|
||||
?: "未绑定手机号"
|
||||
binding.tvUserName.text = displayName
|
||||
binding.tvUserAccount.text = displayAccount
|
||||
if (userInfo.avatar.isNullOrBlank()) {
|
||||
binding.imgAvatar.setImageResource(R.mipmap.icon_mine_user_head_defaul)
|
||||
}
|
||||
//存一下个人信息
|
||||
UserInfoManager.setUserInfo(userInfo)
|
||||
}
|
||||
|
||||
/** 版本检测回调,个人中心暂不处理版本信息。 */
|
||||
|
||||
@@ -39,6 +39,7 @@ class ModifyPsdActivity : BaseActivity<ModifyPsdLayoutBinding, MinePresenter>(),
|
||||
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
binding.includedTitle.tvTitle.text = "修改密码"
|
||||
listOf(
|
||||
binding.oldPsdVisibilityButton,
|
||||
binding.passwordVisibilityButton,
|
||||
|
||||
87
app/src/main/java/com/juhabi/birds/mine/UpdateUserAccount.kt
Normal file
@@ -0,0 +1,87 @@
|
||||
package com.juhabi.birds.mine
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.juhabi.birds.R
|
||||
import com.juhabi.birds.base.BaseActivity
|
||||
import com.juhabi.birds.databinding.ModifyPsdLayoutBinding
|
||||
import com.juhabi.birds.databinding.UpdateUserPhoneLayoutBinding
|
||||
import com.juhabi.birds.main.model.AppVersionInfo
|
||||
import com.juhabi.birds.mine.model.MineUserInfo
|
||||
import com.juhabi.birds.mine.mvp.MineContract
|
||||
import com.juhabi.birds.mine.mvp.MineImpl
|
||||
import com.juhabi.birds.mine.mvp.MinePresenter
|
||||
import com.juhabi.birds.util.manager.UserInfoManager
|
||||
|
||||
/**
|
||||
* 修改手机号
|
||||
*/
|
||||
class UpdateUserAccount : BaseActivity<UpdateUserPhoneLayoutBinding, MinePresenter>(),
|
||||
MineContract.MineView, View.OnClickListener {
|
||||
override fun createBinding(inflater: LayoutInflater): UpdateUserPhoneLayoutBinding {
|
||||
return UpdateUserPhoneLayoutBinding.inflate(inflater)
|
||||
}
|
||||
|
||||
override fun createPresenter(): MinePresenter? {
|
||||
return MinePresenter(MineImpl())
|
||||
}
|
||||
override fun initWindows() {
|
||||
ImmersionBar.with(this)
|
||||
.statusBarView(binding.statusBarView)
|
||||
.statusBarDarkFont(true)
|
||||
.navigationBarColor(R.color.color_zhu)
|
||||
.navigationBarDarkIcon(true)
|
||||
.init()
|
||||
}
|
||||
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
binding.includedTitle.tvTitle.text = "修改密码"
|
||||
var userinfo: MineUserInfo? = UserInfoManager.getUserInfo(mContext);
|
||||
binding.tvUserAccount.text = userinfo?.nickName
|
||||
listOf(
|
||||
binding.tvConfirmGetcode,
|
||||
binding.tvConfirmAccount,
|
||||
binding.tvNewPhoneGetcode,
|
||||
binding.tvSubmitNewAccount,
|
||||
binding.includedTitle.imgBack,
|
||||
).forEach { button ->
|
||||
button.setOnClickListener(this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(view: View) {
|
||||
when(view.id){
|
||||
R.id.img_back ->{
|
||||
finish()
|
||||
}
|
||||
|
||||
R.id.tv_confirm_getcode ->{
|
||||
|
||||
}
|
||||
|
||||
R.id.tv_confirmAccount ->{
|
||||
}
|
||||
|
||||
R.id.tv_new_phone_getcode ->{
|
||||
}
|
||||
|
||||
R.id.tv_submit_new_account ->{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun showError(message: String) {
|
||||
}
|
||||
|
||||
override fun getUserInfoSuccess(userInfo: MineUserInfo) {
|
||||
}
|
||||
|
||||
override fun onVersionChecked(versionInfo: AppVersionInfo) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,24 +1,15 @@
|
||||
package com.juhabi.birds.mine.model
|
||||
|
||||
/**
|
||||
* 3.1 获取当前用户资料接口返回项。
|
||||
*/
|
||||
data class MineUserInfo(
|
||||
val user: User? = null,
|
||||
val permissions: List<Any> = emptyList(),
|
||||
val roles: List<Any> = emptyList(),
|
||||
val url: String? = null
|
||||
) {
|
||||
data class User(
|
||||
val userId: String = "",
|
||||
val tenantId: String = "",
|
||||
val userName: String? = null,
|
||||
val nickName: String = "",
|
||||
val userType: String = "",
|
||||
val email: String = "",
|
||||
val phonenumber: String = "",
|
||||
val sex: String = "",
|
||||
val avatar: String? = null,
|
||||
val status: String = "",
|
||||
val loginIp: String = "",
|
||||
val loginDate: String = "",
|
||||
val createTime: String = ""
|
||||
)
|
||||
}
|
||||
val userName: String = "",
|
||||
val nickName: String = "",
|
||||
val phoneNumber: String? = null,
|
||||
val email: String? = null,
|
||||
val phoneBound: Boolean = false,
|
||||
val userType: String = "",
|
||||
val createTime: String = "",
|
||||
val avatar: String? = null
|
||||
)
|
||||
|
||||
@@ -2,14 +2,14 @@ package com.juhabi.birds.util.manager
|
||||
|
||||
import android.content.Context
|
||||
import com.juhabi.birds.MyApplication
|
||||
import com.juhabi.birds.mine.model.MineUserInfo
|
||||
import com.juhabi.birds.network.TokenManager
|
||||
import com.juhabi.birds.user.model.UserEntity
|
||||
import com.juhabi.birds.util.SharedPreferencesUtil
|
||||
|
||||
/** 管理当前用户的内存缓存和轻量级本地持久化数据。 */
|
||||
object UserInfoManager {
|
||||
@Volatile
|
||||
private var cachedUser: UserEntity? = null
|
||||
private var cachedUser: MineUserInfo? = null
|
||||
|
||||
@JvmStatic
|
||||
fun getInstance(): UserInfoManager = this
|
||||
@@ -21,42 +21,42 @@ object UserInfoManager {
|
||||
cachedUser = SharedPreferencesUtil.getObject(
|
||||
context,
|
||||
KEY_USER_INFO,
|
||||
UserEntity::class.java
|
||||
MineUserInfo::class.java
|
||||
)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getUserInfo(): UserEntity? = getUserInfo(MyApplication.appContext)
|
||||
fun getUserInfo(): MineUserInfo? = getUserInfo(MyApplication.appContext)
|
||||
|
||||
@JvmStatic
|
||||
fun getUserInfo(context: Context): UserEntity? {
|
||||
fun getUserInfo(context: Context): MineUserInfo? {
|
||||
cachedUser?.let { return it }
|
||||
return SharedPreferencesUtil.getObject(
|
||||
context,
|
||||
KEY_USER_INFO,
|
||||
UserEntity::class.java
|
||||
MineUserInfo::class.java
|
||||
)?.also { cachedUser = it }
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setUserInfo(userInfo: UserEntity) {
|
||||
fun setUserInfo(userInfo: MineUserInfo) {
|
||||
setUserInfo(MyApplication.appContext, userInfo)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setUserInfo(context: Context, userInfo: UserEntity) {
|
||||
fun setUserInfo(context: Context, userInfo: MineUserInfo) {
|
||||
cachedUser = userInfo
|
||||
SharedPreferencesUtil.putObject(context, KEY_USER_INFO, userInfo)
|
||||
}
|
||||
|
||||
/** 登录成功后统一保存用户信息和 token。 */
|
||||
@JvmStatic
|
||||
fun saveLogin(userInfo: UserEntity, token: String) {
|
||||
fun saveLogin(userInfo: MineUserInfo, token: String) {
|
||||
saveLogin(MyApplication.appContext, userInfo, token)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun saveLogin(context: Context, userInfo: UserEntity, token: String) {
|
||||
fun saveLogin(context: Context, userInfo: MineUserInfo, token: String) {
|
||||
setUserInfo(context, userInfo)
|
||||
TokenManager.save(context, token)
|
||||
SharedPreferencesUtil.putBoolean(context, KEY_USER_LOGIN, token.isNotBlank())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/bottom_nav_selected" android:state_checked="true" />
|
||||
<item android:color="@color/color_zhu" android:state_checked="true" />
|
||||
<item android:color="@color/bottom_nav_unselected" />
|
||||
</selector>
|
||||
|
||||
6
app/src/main/res/drawable/bind_dev_input_line_bg.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<stroke android:color="@color/color_999999" android:width="1dp"/>
|
||||
<corners android:radius="8dp"/>
|
||||
</shape>
|
||||
@@ -1,5 +1,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FFFFFFFF" />
|
||||
<stroke android:width="1dp" android:color="#FFD0D5DD" />
|
||||
<corners android:radius="6dp" />
|
||||
<solid android:color="@color/white" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/color_E0E0E0" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
|
||||
<path android:fillColor="#FF000000" android:pathData="M3,10.5L12,3l9,7.5V21a1,1 0,0 1,-1 1H4a1,1 0,0 1,-1 -1zM9,22v-7h6v7" />
|
||||
</vector>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@mipmap/icon_mian_index_true" android:state_checked="true" />
|
||||
<item android:drawable="@mipmap/icon_mian_index_false" />
|
||||
</selector>
|
||||
@@ -1,3 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,12a4,4 0,1 0,0 -8a4,4 0,0 0,0 8zM4,21a8,8 0,0 1,16 0z" />
|
||||
</vector>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@mipmap/icon_main_mine_true" android:state_checked="true" />
|
||||
<item android:drawable="@mipmap/icon_main_mine_false" />
|
||||
</selector>
|
||||
20
app/src/main/res/drawable/progress_foot_bg.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 背景颜色 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_c4c2c2"/> <!-- 其余颜色 -->
|
||||
<corners android:radius="5dp"/> <!-- 圆角 -->
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 前景颜色 -->
|
||||
<item>
|
||||
<clip>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_ffb163"/> <!-- 已有进程颜色 -->
|
||||
<corners android:radius="5dp"/> <!-- 圆角 -->
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
20
app/src/main/res/drawable/progress_head_bg.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 背景颜色 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_c4c2c2"/> <!-- 其余颜色 -->
|
||||
<corners android:radius="5dp"/> <!-- 圆角 -->
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 前景颜色 -->
|
||||
<item>
|
||||
<clip>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_zhu"/> <!-- 已有进程颜色 -->
|
||||
<corners android:radius="5dp"/> <!-- 圆角 -->
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
20
app/src/main/res/drawable/progress_offline_bg.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 背景颜色 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_c4c2c2"/> <!-- 其余颜色 -->
|
||||
<corners android:radius="5dp"/> <!-- 圆角 -->
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 前景颜色 -->
|
||||
<item>
|
||||
<clip>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_999999"/> <!-- 已有进程颜色 -->
|
||||
<corners android:radius="5dp"/> <!-- 圆角 -->
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
5
app/src/main/res/drawable/shape_device_offline_bg.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/color_e34d59"/>
|
||||
<corners android:radius="15dp"/>
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/shape_device_online_bg.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/color_zhu"/>
|
||||
<corners android:radius="15dp"/>
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/shape_device_wifi_power_bg.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/color_ededed"/>
|
||||
<corners android:radius="8dp"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/shape_logout_field_bg.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/color_zhu" />
|
||||
<corners android:radius="25dp" />
|
||||
<stroke android:width="1dp" android:color="@color/white"/>
|
||||
</shape>
|
||||
@@ -2,7 +2,8 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_zhu">
|
||||
<View
|
||||
android:id="@+id/statusBarView"
|
||||
android:layout_width="match_parent"
|
||||
@@ -17,12 +18,120 @@
|
||||
android:id="@+id/included_title"
|
||||
layout="@layout/include_activity_back_gray_layout" />
|
||||
</RelativeLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/shape_login_field_8_corner_bg"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:padding="20dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:text="绑定"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bind_dev_input_line_bg">
|
||||
<EditText
|
||||
android:id="@+id/et_device_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginStart="15dp"
|
||||
android:background="@null"
|
||||
android:hint="请输入设备编码"/>
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:src="@mipmap/icon_bind_scan"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:text="设备名称"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bind_dev_input_line_bg">
|
||||
<EditText
|
||||
android:id="@+id/et_device_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginStart="15dp"
|
||||
android:background="@null"
|
||||
android:maxLength="20"
|
||||
android:hint="请输入设备名称"/>
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:src="@mipmap/icon_bind_scan"
|
||||
android:visibility="invisible"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_999999"
|
||||
android:text="最多支持20个字符"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/shape_login_field_8_corner_bg"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="20dp"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="7"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:text="IMEI码可在设备机身上的二维码标签旁边找到"/>
|
||||
<ImageView
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:src="@mipmap/icon_bind_hint"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:textSize="15sp"
|
||||
android:text="绑定"
|
||||
android:background="@color/color_zhu"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="84dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_login_field_bg"
|
||||
android:backgroundTint="@null"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="确定"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/color_zhu"
|
||||
android:textSize="17sp" />
|
||||
</LinearLayout>
|
||||
@@ -3,72 +3,307 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#FFFFFF"
|
||||
android:elevation="2dp"
|
||||
android:padding="14dp">
|
||||
|
||||
android:layout_marginTop="10dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="end">
|
||||
<ImageView
|
||||
android:id="@+id/img_tips"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_gravity="end"/>
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="13dp"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:background="@drawable/shape_login_field_8_corner_bg">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:id="@+id/tv_dev_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textStyle="bold"
|
||||
android:text="设备A"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_dev_eye_status"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/icon_dev_open_eye"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_dev_online_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="2dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:textSize="12sp"
|
||||
android:text="在线"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/shape_device_online_bg"/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_dev_more"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:id="@+id/tv_dev_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="15455646546564"/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_update_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="更新时间"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="12dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="@drawable/shape_device_wifi_power_bg">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="设备信号强度"/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_signal"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@mipmap/icon_dev_wifi_hight"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_signal_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/color_zhu"
|
||||
android:textStyle="bold"
|
||||
android:text="强"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="12dp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="12dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="@drawable/shape_device_wifi_power_bg">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="头套连接状态"/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_head_foot_connect_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/color_zhu"
|
||||
android:textStyle="bold"
|
||||
android:text="已连接"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/shape_device_wifi_power_bg">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="头套设备电量"/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_head_power_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="95%"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_head_power_icon"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@mipmap/icon_power_head_high"
|
||||
android:layout_marginStart="5dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_head"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:progressDrawable="@drawable/progress_head_bg"
|
||||
android:max="100"
|
||||
android:progress="50"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/shape_device_wifi_power_bg">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="脚环设备电量"/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_foot_power_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="95%"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_foot_power_icon"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@mipmap/icon_power_foot_high"
|
||||
android:layout_marginStart="5dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_foot"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:progressDrawable="@drawable/progress_foot_bg"
|
||||
android:max="100"
|
||||
android:progress="50"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textStyle="bold"
|
||||
android:text="当前位置"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="5dp">
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@mipmap/icon_dev_location"
|
||||
android:layout_marginStart="5dp"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_location_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="浙江省杭州市西湖区天目山路国家森林公园上空,海拔236米。"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_show_map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/color_zhu"
|
||||
android:text="查看地图"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_device_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#222222"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_device_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#2E8B57"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_device_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="#555555"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_device_imei"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#777777"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_device_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#777777"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_device_location"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#777777"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -3,58 +3,96 @@
|
||||
android:id="@+id/contentDialog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@drawable/dialog_round_efefef_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="28dp"
|
||||
android:paddingBottom="24dp">
|
||||
android:layout_marginHorizontal="36dp"
|
||||
android:background="@drawable/bg_confirm_dialog"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialogTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#FF333333"
|
||||
android:textSize="17sp"
|
||||
android:text=""
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialogLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:text=""
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/dialogInput"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:background="@drawable/dialog_input_bg"
|
||||
android:hint="请输入内容"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textColor="#FF222222"
|
||||
android:textColorHint="#FF98A2B3"
|
||||
android:textSize="16sp" />
|
||||
android:gravity="center_vertical"
|
||||
android:hint=""
|
||||
android:inputType="text"
|
||||
android:maxLength="20"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColorHint="@color/color_999999"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialogTip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:lineSpacingExtra="3dp"
|
||||
android:text=""
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/color_E0E0E0" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_height="52dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialogCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="13dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/permission_dialog_cancel_bg"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="#FF666666" />
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_E0E0E0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialogConfirm"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/permission_dialog_confirm_bg"
|
||||
android:gravity="center"
|
||||
android:text="确定"
|
||||
android:textColor="#FFFFFFFF" />
|
||||
android:text="确认修改"
|
||||
android:textColor="@color/color_zhu"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -5,36 +5,50 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/page_background"
|
||||
android:orientation="vertical">
|
||||
<RelativeLayout
|
||||
android:orientation="vertical"
|
||||
android:backgroundTint="@color/color_zhu">
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp">
|
||||
<include
|
||||
android:id="@+id/included_title"
|
||||
layout="@layout/include_title_home_layout" />
|
||||
</RelativeLayout>
|
||||
android:layout_height="54dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/color_zhu"
|
||||
android:gravity="center_vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_my_devices"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/my_device"/>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/icon_dev_point_down"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tv_index"
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/home_page_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="24sp" />
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_scan"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_marginEnd="15dp"/>
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:src="@mipmap/icon_dev_add"
|
||||
android:layout_marginEnd="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refresh"
|
||||
android:layout_width="match_parent"
|
||||
@@ -48,9 +62,10 @@
|
||||
android:id="@+id/rv_devices"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/device_item"
|
||||
android:clipToPadding="false"
|
||||
android:paddingHorizontal="15dp"
|
||||
tools:itemCount="5"
|
||||
tools:itemCount="3"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
@@ -30,5 +30,12 @@
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/open_component_center" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/modifyPasswordButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/modify_password" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
330
app/src/main/res/layout/mine_center_layout.xml
Normal file
@@ -0,0 +1,330 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_zhu">
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingVertical="5dp">
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/img_avatar"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:riv_corner_radius="30dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_mine_user_head_defaul"
|
||||
android:layout_marginStart="20dp"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="用户名"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="13366668888"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_xgmm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_marginTop="25dp">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@mipmap/icon_mine_xgmm"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginStart="18dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="修改密码"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_mine_point"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_ghsj"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_marginTop="25dp">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@mipmap/icon_mine_hbsj"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginStart="18dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="换绑手机号"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_mine_point"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_qchc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_marginTop="25dp">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@mipmap/icon_mine_qchc"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginStart="18dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="清除缓存"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_mine_point"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_bbxx"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_marginTop="25dp">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@mipmap/icon_mine_bbxx"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginStart="18dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="版本信息"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_mine_point"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_ysxy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_marginTop="25dp">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@mipmap/icon_mine_ysxy"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginStart="18dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="隐私协议"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_mine_point"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_yhxy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_marginTop="25dp">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@mipmap/icon_mine_yhxy"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginStart="18dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="用户协议"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_mine_point"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_qhyy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_marginTop="25dp">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@mipmap/icon_mine_qhyy"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginStart="18dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="切换语言"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_mine_point"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_zxzh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_marginTop="25dp">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@mipmap/icon_mine_zxzh"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginStart="18dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="注销账号"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_mine_point"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_logout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="45dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_logout_field_bg"
|
||||
android:backgroundTint="@null"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="退出登录"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -3,54 +3,69 @@
|
||||
android:id="@+id/contentDialog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@drawable/dialog_round_efefef_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="24dp">
|
||||
android:layout_marginHorizontal="36dp"
|
||||
android:background="@drawable/bg_confirm_dialog"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/permissionTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#FF333333"
|
||||
android:text="提示"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/permissionContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:gravity="center"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:textColor="#FF666666"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:text="内容内容"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/color_E0E0E0" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_height="52dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/permissionCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/permission_dialog_cancel_bg"
|
||||
android:gravity="center"
|
||||
android:text="不允许"
|
||||
android:textColor="#FF666666" />
|
||||
android:text="取消"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_E0E0E0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/permissionAllow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/permission_dialog_confirm_bg"
|
||||
android:gravity="center"
|
||||
android:text="允许"
|
||||
android:textColor="#FFFFFFFF" />
|
||||
android:text="确定"
|
||||
android:textColor="@color/color_zhu"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
android:src="@mipmap/icon_login_phone"
|
||||
android:contentDescription="@null" />
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_country"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
|
||||
223
app/src/main/res/layout/update_user_phone_layout.xml
Normal file
@@ -0,0 +1,223 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_zhu">
|
||||
<View
|
||||
android:id="@+id/statusBarView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/color_zhu" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp">
|
||||
|
||||
<include
|
||||
android:id="@+id/included_title"
|
||||
layout="@layout/include_activity_back_gray_layout" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_confirm_user_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="20dp"
|
||||
android:background="@drawable/shape_login_field_8_corner_bg">
|
||||
<TextView
|
||||
android:id="@+id/tv_dev_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text="当前绑定账号"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_black1"
|
||||
android:text=""/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/shape_login_field_bg"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:src="@mipmap/icon_login_code"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Et_confirm_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@null"
|
||||
android:hint="请输入验证码"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:textColorHint="@color/color_999999"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm_getcode"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="38dp"
|
||||
android:background="@drawable/shape_register_code_bg"
|
||||
android:backgroundTint="@null"
|
||||
android:stateListAnimator="@null"
|
||||
android:gravity="center"
|
||||
android:text="@string/register_get_code"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_confirmAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="84dp"
|
||||
android:layout_marginBottom="170dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_login_field_bg"
|
||||
android:backgroundTint="@null"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="确定"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/color_zhu"
|
||||
android:textSize="17sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_new_user_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/shape_login_field_bg"
|
||||
android:paddingStart="14dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:src="@mipmap/icon_login_phone"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_new_phone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="请输入手机号"
|
||||
android:inputType="phone"
|
||||
android:layout_marginStart="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColorHint="@color/color_999999"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/shape_login_field_bg"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:src="@mipmap/icon_login_code"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_new_phone_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@null"
|
||||
android:hint="请输入验证码"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:textColorHint="@color/color_999999"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_new_phone_getcode"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="38dp"
|
||||
android:background="@drawable/shape_register_code_bg"
|
||||
android:backgroundTint="@null"
|
||||
android:stateListAnimator="@null"
|
||||
android:gravity="center"
|
||||
android:text="@string/register_get_code"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_submit_new_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="84dp"
|
||||
android:layout_marginBottom="170dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_login_field_bg"
|
||||
android:backgroundTint="@null"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="确认修改"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/color_zhu"
|
||||
android:textSize="17sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -3,9 +3,9 @@
|
||||
<item
|
||||
android:id="@+id/navigation_home"
|
||||
android:icon="@drawable/ic_nav_home"
|
||||
android:title="@string/tab_home" />
|
||||
android:title="@string/device_list" />
|
||||
<item
|
||||
android:id="@+id/navigation_mine"
|
||||
android:icon="@drawable/ic_nav_mine"
|
||||
android:title="@string/tab_mine" />
|
||||
android:title="@string/mine_title" />
|
||||
</menu>
|
||||
|
||||
BIN
app/src/main/res/mipmap-xhdpi/icon_bind_hint.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_bind_scan.png
Normal file
|
After Width: | Height: | Size: 674 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_add.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_close_eye.png
Normal file
|
After Width: | Height: | Size: 826 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_location.png
Normal file
|
After Width: | Height: | Size: 767 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_more.png
Normal file
|
After Width: | Height: | Size: 492 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_open_eye.png
Normal file
|
After Width: | Height: | Size: 817 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_point_down.png
Normal file
|
After Width: | Height: | Size: 273 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_power_offline.png
Normal file
|
After Width: | Height: | Size: 253 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_wifi_hight.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_wifi_low.png
Normal file
|
After Width: | Height: | Size: 614 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_wifi_mid.png
Normal file
|
After Width: | Height: | Size: 602 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_dev_wifi_offline.png
Normal file
|
After Width: | Height: | Size: 587 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_input_index_false.png
Normal file
|
After Width: | Height: | Size: 487 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_input_index_true.png
Normal file
|
After Width: | Height: | Size: 480 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_main_mine_false.png
Normal file
|
After Width: | Height: | Size: 729 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_main_mine_true.png
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_mian_index_false.png
Normal file
|
After Width: | Height: | Size: 727 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_mian_index_true.png
Normal file
|
After Width: | Height: | Size: 537 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_bbxx.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_hbsj.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_point.png
Normal file
|
After Width: | Height: | Size: 189 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_qchc.png
Normal file
|
After Width: | Height: | Size: 938 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_qhyy.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_user_head_defaul.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_xgmm.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_yhxy.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_ysxy.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_mine_zxzh.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_power_foot_high.png
Normal file
|
After Width: | Height: | Size: 256 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_power_foot_mid.png
Normal file
|
After Width: | Height: | Size: 249 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_power_head_high.png
Normal file
|
After Width: | Height: | Size: 256 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_power_head_mid.png
Normal file
|
After Width: | Height: | Size: 249 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_power_low.png
Normal file
|
After Width: | Height: | Size: 217 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_scan_index_false.png
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_scan_index_true.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_switch_off.png
Normal file
|
After Width: | Height: | Size: 821 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_switch_on.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_bind_hint.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_bind_scan.png
Normal file
|
After Width: | Height: | Size: 674 B |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_add.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_close_eye.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_location.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_more.png
Normal file
|
After Width: | Height: | Size: 897 B |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_open_eye.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_point_down.png
Normal file
|
After Width: | Height: | Size: 446 B |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_power_offline.png
Normal file
|
After Width: | Height: | Size: 638 B |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_wifi_hight.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_wifi_low.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_wifi_mid.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_dev_wifi_offline.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_input_index_false.png
Normal file
|
After Width: | Height: | Size: 1012 B |
BIN
app/src/main/res/mipmap-xxhdpi/icon_input_index_true.png
Normal file
|
After Width: | Height: | Size: 955 B |
BIN
app/src/main/res/mipmap-xxhdpi/icon_main_mine_false.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_main_mine_true.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_mian_index_false.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |