Fix country list + Contact view for tablet
This commit is contained in:
parent
76e1519046
commit
7b6a7c3931
9 changed files with 74 additions and 346 deletions
|
@ -74,7 +74,6 @@
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<data android:scheme="sip" />
|
<data android:scheme="sip" />
|
||||||
<data android:scheme="imto" />
|
<data android:scheme="imto" />
|
||||||
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
|
@ -1,246 +0,0 @@
|
||||||
[
|
|
||||||
{"name":"Afghanistan","dial_code":"+93","code":"AF","maxNum":"9"},
|
|
||||||
{"name":"Albania","dial_code":"+355","code":"AL","maxNum":"9"},
|
|
||||||
{"name":"Algeria","dial_code":"+213","code":"DZ","maxNum":"9"},
|
|
||||||
{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS","maxNum":"10"},
|
|
||||||
{"name":"Andorra","dial_code":"+376","code":"AD","maxNum":"6"},
|
|
||||||
{"name":"Angola","dial_code":"+244","code":"AO","maxNum":"9"},
|
|
||||||
{"name":"Anguilla","dial_code":"+1 264","code":"AI","maxNum":"10"},
|
|
||||||
{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG","maxNum":"10"},
|
|
||||||
{"name":"Argentina","dial_code":"+54","code":"AR","maxNum":"10"},
|
|
||||||
{"name":"Armenia","dial_code":"+374","code":"AM","maxNum":"8"},
|
|
||||||
{"name":"Aruba","dial_code":"+297","code":"AW","maxNum":"7"},
|
|
||||||
{"name":"Australia","dial_code":"+61","code":"AU","maxNum":"9"},
|
|
||||||
{"name":"Austria","dial_code":"+43","code":"AT","maxNum":"10"},
|
|
||||||
{"name":"Azerbaijan","dial_code":"+994","code":"AZ","maxNum":"9"},
|
|
||||||
{"name":"Bahamas","dial_code":"+1 242","code":"BS","maxNum":"10"},
|
|
||||||
{"name":"Bahrain","dial_code":"+973","code":"BH","maxNum":"8"},
|
|
||||||
{"name":"Bangladesh","dial_code":"+880","code":"BD","maxNum":"10"},
|
|
||||||
{"name":"Barbados","dial_code":"+1 246","code":"BB","maxNum":"10"},
|
|
||||||
{"name":"Belarus","dial_code":"+375","code":"BY","maxNum":"9"},
|
|
||||||
{"name":"Belgium","dial_code":"+32","code":"BE","maxNum":"9"},
|
|
||||||
{"name":"Belize","dial_code":"+501","code":"BZ","maxNum":"7"},
|
|
||||||
{"name":"Benin","dial_code":"+229","code":"BJ","maxNum":"8"},
|
|
||||||
{"name":"Bermuda","dial_code":"+1 441","code":"BM","maxNum":"10"},
|
|
||||||
{"name":"Bhutan","dial_code":"+975","code":"BT","maxNum":"8"},
|
|
||||||
{"name":"Bolivia","dial_code":"+591","code":"BO","maxNum":"8"},
|
|
||||||
{"name":"Bosnia and Herzegovina","dial_code":"+387","code":"BA","maxNum":"8"},
|
|
||||||
{"name":"Botswana","dial_code":"+267","code":"BW","maxNum":"8"},
|
|
||||||
{"name":"Brazil","dial_code":"+55","code":"BR","maxNum":"10"},
|
|
||||||
{"name":"Brunei Darussalam","dial_code":"+673","code":"BN","maxNum":"7"},
|
|
||||||
{"name":"British Indian Ocean Territory","dial_code":"+246","code":"IO","maxNum":"0"},
|
|
||||||
{"name":"Bulgaria","dial_code":"+359","code":"BG","maxNum":"9"},
|
|
||||||
{"name":"Burkina Faso","dial_code":"+226","code":"BF","maxNum":"8"},
|
|
||||||
{"name":"Burundi","dial_code":"+257","code":"BI","maxNum":"8"},
|
|
||||||
{"name":"Cambodia","dial_code":"+855","code":"KH","maxNum":"9"},
|
|
||||||
{"name":"Cameroon","dial_code":"+237","code":"CM","maxNum":"8"},
|
|
||||||
{"name":"Canada","dial_code":"+1","code":"CA","maxNum":"10"},
|
|
||||||
{"name":"Cape Verde","dial_code":"+238","code":"CV","maxNum":"7"},
|
|
||||||
{"name":"Cayman Islands","dial_code":"+ 345","code":"KY","maxNum":"10"},
|
|
||||||
{"name":"Central African Republic","dial_code":"+236","code":"CF","maxNum":"8"},
|
|
||||||
{"name":"Chad","dial_code":"+235","code":"TD","maxNum":"8"},
|
|
||||||
{"name":"Chile","dial_code":"+56","code":"CL","maxNum":"9"},
|
|
||||||
{"name":"China","dial_code":"+86","code":"CN","maxNum":"11"},
|
|
||||||
{"name":"Christmas Island","dial_code":"+61","code":"CX","maxNum":"0"},
|
|
||||||
{"name":"Colombia","dial_code":"+57","code":"CO","maxNum":"10"},
|
|
||||||
{"name":"Comoros","dial_code":"+269","code":"KM","maxNum":"7"},
|
|
||||||
{"name":"Congo","dial_code":"+242","code":"CG","maxNum":"9"},
|
|
||||||
{"name":"Congo,Democratic Republic","dial_code":"+243","code":"CD","maxNum":"9"},
|
|
||||||
{"name":"Cook Islands","dial_code":"+682","code":"CK","maxNum":"5"},
|
|
||||||
{"name":"Costa Rica","dial_code":"+506","code":"CR","maxNum":"8"},
|
|
||||||
{"name":"Cote d'Ivoire","dial_code":"+225","code":"CI","maxNum":"8"},
|
|
||||||
{"name":"Croatia","dial_code":"+385","code":"HR","maxNum":"9"},
|
|
||||||
{"name":"Cuba","dial_code":"+53","code":"CU","maxNum":"8"},
|
|
||||||
{"name":"Cyprus","dial_code":"+537","code":"CY","maxNum":"8"},
|
|
||||||
{"name":"Czech Republic","dial_code":"+420","code":"CZ","maxNum":"9"},
|
|
||||||
{"name":"Denmark","dial_code":"+45","code":"DK","maxNum":"8"},
|
|
||||||
{"name":"Djibouti","dial_code":"+253","code":"DJ","maxNum":"8"},
|
|
||||||
{"name":"Dominica","dial_code":"+1 767","code":"DM","maxNum":"10"},
|
|
||||||
{"name":"Dominican Republic","dial_code":"+1 849","code":"DO","maxNum":"10"},
|
|
||||||
{"name":"Ecuador","dial_code":"+593","code":"EC","maxNum":"9"},
|
|
||||||
{"name":"Egypt","dial_code":"+20","code":"EG","maxNum":"10"},
|
|
||||||
{"name":"El Salvador","dial_code":"+503","code":"SV","maxNum":"8"},
|
|
||||||
{"name":"Equatorial Guinea","dial_code":"+240","code":"GQ","maxNum":"9"},
|
|
||||||
{"name":"Eritrea","dial_code":"+291","code":"ER","maxNum":"7"},
|
|
||||||
{"name":"Estonia","dial_code":"+372","code":"EE","maxNum":"8"},
|
|
||||||
{"name":"Ethiopia","dial_code":"+251","code":"ET","maxNum":"9"},
|
|
||||||
{"name":"Falkland Islands","dial_code":"+500","code":"FK","maxNum":"5"},
|
|
||||||
{"name":"Faroe Islands","dial_code":"+298","code":"FO","maxNum":"6"},
|
|
||||||
{"name":"Fiji","dial_code":"+679","code":"FJ","maxNum":"7"},
|
|
||||||
{"name":"Finland","dial_code":"+358","code":"FI","maxNum":"9"},
|
|
||||||
{"name":"France","dial_code":"+33","code":"FR","maxNum":"9"},
|
|
||||||
{"name":"French Guiana","dial_code":"+594","code":"GF","maxNum":"9"},
|
|
||||||
{"name":"French Polynesia","dial_code":"+689","code":"PF","maxNum":"6"},
|
|
||||||
{"name":"Gabon","dial_code":"+241","code":"GA","maxNum":"8"},
|
|
||||||
{"name":"Gambia","dial_code":"+220","code":"GM","maxNum":"7"},
|
|
||||||
{"name":"Georgia","dial_code":"+995","code":"GE","maxNum":"9"},
|
|
||||||
{"name":"Germany","dial_code":"+49","code":"DE","maxNum":"11"},
|
|
||||||
{"name":"Ghana","dial_code":"+233","code":"GH","maxNum":"9"},
|
|
||||||
{"name":"Gibraltar","dial_code":"+350","code":"GI","maxNum":"8"},
|
|
||||||
{"name":"Greece","dial_code":"+30","code":"GR","maxNum":"10"},
|
|
||||||
{"name":"Greenland","dial_code":"+299","code":"GL","maxNum":"6"},
|
|
||||||
{"name":"Grenada","dial_code":"+1 473","code":"GD","maxNum":"10"},
|
|
||||||
{"name":"Guadeloupe","dial_code":"+590","code":"GP","maxNum":"9"},
|
|
||||||
{"name":"Guam","dial_code":"+1 671","code":"GU","maxNum":"10"},
|
|
||||||
{"name":"Guatemala","dial_code":"+502","code":"GT","maxNum":"8"},
|
|
||||||
{"name":"Guinea","dial_code":"+224","code":"GN","maxNum":"8"},
|
|
||||||
{"name":"Guinea-Bissau","dial_code":"+245","code":"GW","maxNum":"7"},
|
|
||||||
{"name":"Guyana","dial_code":"+595","code":"GY","maxNum":"7"},
|
|
||||||
{"name":"Haiti","dial_code":"+509","code":"HT","maxNum":"8"},
|
|
||||||
{"name":"Honduras","dial_code":"+504","code":"HN","maxNum":"8"},
|
|
||||||
{"name":"Hong Kong","dial_code":"+852","code":"HK","maxNum":"8"},
|
|
||||||
{"name":"Hungary","dial_code":"+36","code":"HU","maxNum":"9"},
|
|
||||||
{"name":"Iceland","dial_code":"+354","code":"IS","maxNum":"9"},
|
|
||||||
{"name":"India","dial_code":"+91","code":"IN","maxNum":"10"},
|
|
||||||
{"name":"Indonesia","dial_code":"+62","code":"ID","maxNum":"10"},
|
|
||||||
{"name":"Iran, Islamic Republic of","dial_code":"+98","code":"IR","maxNum":"10"},
|
|
||||||
{"name":"Iraq","dial_code":"+964","code":"IQ","maxNum":"10"},
|
|
||||||
{"name":"Ireland","dial_code":"+353","code":"IE","maxNum":"9"},
|
|
||||||
{"name":"Israel","dial_code":"+972","code":"IL","maxNum":"9"},
|
|
||||||
{"name":"Italy","dial_code":"+39","code":"IT","maxNum":"10"},
|
|
||||||
{"name":"Jamaica","dial_code":"+1 876","code":"JM","maxNum":"10"},
|
|
||||||
{"name":"Japan","dial_code":"+81","code":"JP","maxNum":"10"},
|
|
||||||
{"name":"Jordan","dial_code":"+962","code":"JO","maxNum":"9"},
|
|
||||||
{"name":"Kazakhstan","dial_code":"+7 7","code":"KZ","maxNum":"10"},
|
|
||||||
{"name":"Kenya","dial_code":"+254","code":"KE","maxNum":"9"},
|
|
||||||
{"name":"Kiribati","dial_code":"+686","code":"KI","maxNum":"5"},
|
|
||||||
{"name":"Korea, People's Rep.","dial_code":"+850","code":"KP","maxNum":"12"},
|
|
||||||
{"name":"Korea, Republic of","dial_code":"+82","code":"KR","maxNum":"12"},
|
|
||||||
{"name":"Kuwait","dial_code":"+965","code":"KW","maxNum":"8"},
|
|
||||||
{"name":"Kyrgyzstan","dial_code":"+996","code":"KG","maxNum":"9"},
|
|
||||||
{"name":"Lao People's Democratic Rep.","dial_code":"+856","code":"LA","maxNum":"10"},
|
|
||||||
{"name":"Latvia","dial_code":"+371","code":"LV","maxNum":"8"},
|
|
||||||
{"name":"Lebanon","dial_code":"+961","code":"LB","maxNum":"7"},
|
|
||||||
{"name":"Lesotho","dial_code":"+266","code":"LS","maxNum":"8"},
|
|
||||||
{"name":"Libyan Arab Jamahiriya","dial_code":"+218","code":"LY","maxNum":"8"},
|
|
||||||
{"name":"Liberia","dial_code":"+231","code":"LR","maxNum":"8"},
|
|
||||||
{"name":"Liechtenstein","dial_code":"+423","code":"LI","maxNum":"7"},
|
|
||||||
{"name":"Lithuania","dial_code":"+370","code":"LT","maxNum":"8"},
|
|
||||||
{"name":"Luxembourg","dial_code":"+352","code":"LU","maxNum":"9"},
|
|
||||||
{"name":"Macao","dial_code":"+853","code":"MO","maxNum":"8"},
|
|
||||||
{"name":"Macedonia","dial_code":"+389","code":"MK","maxNum":"8"},
|
|
||||||
{"name":"Micronesia","dial_code":"+691","code":"FM","maxNum":"7"},
|
|
||||||
{"name":"Madagascar","dial_code":"+261","code":"MG","maxNum":"9"},
|
|
||||||
{"name":"Malawi","dial_code":"+265","code":"MW","maxNum":"9"},
|
|
||||||
{"name":"Malaysia","dial_code":"+60","code":"MY","maxNum":"9"},
|
|
||||||
{"name":"Maldives","dial_code":"+960","code":"MV","maxNum":"7"},
|
|
||||||
{"name":"Mali","dial_code":"+223","code":"ML","maxNum":"8"},
|
|
||||||
{"name":"Malta","dial_code":"+356","code":"MT","maxNum":"8"},
|
|
||||||
{"name":"Marshall Islands","dial_code":"+692","code":"MH","maxNum":"7"},
|
|
||||||
{"name":"Martinique","dial_code":"+596","code":"MQ","maxNum":"9"},
|
|
||||||
{"name":"Mauritania","dial_code":"+222","code":"MR","maxNum":"8"},
|
|
||||||
{"name":"Mauritius","dial_code":"+230","code":"MU","maxNum":"7"},
|
|
||||||
{"name":"Mayotte","dial_code":"+262","code":"YT","maxNum":"9"},
|
|
||||||
{"name":"Mexico","dial_code":"+52","code":"MX","maxNum":"10"},
|
|
||||||
{"name":"Moldova, Republic of","dial_code":"+373","code":"MD","maxNum":"8"},
|
|
||||||
{"name":"Monaco","dial_code":"+377","code":"MC","maxNum":"8"},
|
|
||||||
{"name":"Mongolia","dial_code":"+976","code":"MN","maxNum":"8"},
|
|
||||||
{"name":"Montenegro","dial_code":"+382","code":"ME","maxNum":"8"},
|
|
||||||
{"name":"Montserrat","dial_code":"+1664","code":"MS","maxNum":"10"},
|
|
||||||
{"name":"Morocco","dial_code":"+212","code":"MA","maxNum":"9"},
|
|
||||||
{"name":"Mozambique","dial_code":"+258","code":"MZ","maxNum":"9"},
|
|
||||||
{"name":"Myanmar","dial_code":"+95","code":"MM","maxNum":"8"},
|
|
||||||
{"name":"Namibia","dial_code":"+264","code":"NA","maxNum":"9"},
|
|
||||||
{"name":"Nauru","dial_code":"+674","code":"NR","maxNum":"7"},
|
|
||||||
{"name":"Nepal","dial_code":"+977","code":"NP","maxNum":"10"},
|
|
||||||
{"name":"Netherlands","dial_code":"+31","code":"NL","maxNum":"9"},
|
|
||||||
{"name":"Netherlands Antilles","dial_code":"+599","code":"AN","maxNum":"0"},
|
|
||||||
{"name":"New Caledonia","dial_code":"+687","code":"NC","maxNum":"6"},
|
|
||||||
{"name":"New Zealand","dial_code":"+64","code":"NZ","maxNum":"10"},
|
|
||||||
{"name":"Nicaragua","dial_code":"+505","code":"NI","maxNum":"8"},
|
|
||||||
{"name":"Niger","dial_code":"+227","code":"NE","maxNum":"8"},
|
|
||||||
{"name":"Nigeria","dial_code":"+234","code":"NG","maxNum":"10"},
|
|
||||||
{"name":"Niue","dial_code":"+683","code":"NU","maxNum":"4"},
|
|
||||||
{"name":"Norfolk Island","dial_code":"+672","code":"NF","maxNum":"5"},
|
|
||||||
{"name":"Northern Mariana Islands","dial_code":"+1 670","code":"MP","maxNum":"10"},
|
|
||||||
{"name":"Norway","dial_code":"+47","code":"NO","maxNum":"8"},
|
|
||||||
{"name":"Oman","dial_code":"+968","code":"OM","maxNum":"8"},
|
|
||||||
{"name":"Pakistan","dial_code":"+92","code":"PK","maxNum":"10"},
|
|
||||||
{"name":"Palau","dial_code":"+680","code":"PW","maxNum":"7"},
|
|
||||||
{"name":"Palestine","dial_code":"+970","code":"PS","maxNum":"9"},
|
|
||||||
{"name":"Panama","dial_code":"+507","code":"PA","maxNum":"8"},
|
|
||||||
{"name":"Papua New Guinea","dial_code":"+675","code":"PG","maxNum":"8"},
|
|
||||||
{"name":"Paraguay","dial_code":"+595","code":"PY","maxNum":"9"},
|
|
||||||
{"name":"Peru","dial_code":"+51","code":"PE","maxNum":"9"},
|
|
||||||
{"name":"Philippines","dial_code":"+63","code":"PH","maxNum":"10"},
|
|
||||||
{"name":"Poland","dial_code":"+48","code":"PL","maxNum":"9"},
|
|
||||||
{"name":"Portugal","dial_code":"+351","code":"PT","maxNum":"9"},
|
|
||||||
{"name":"Puerto Rico","dial_code":"+1 939","code":"PR","maxNum":"10"},
|
|
||||||
{"name":"Qatar","dial_code":"+974","code":"QA","maxNum":"8"},
|
|
||||||
{"name":"Romania","dial_code":"+40","code":"RO","maxNum":"9"},
|
|
||||||
{"name":"Russian Federation","dial_code":"+7","code":"RU","maxNum":"10"},
|
|
||||||
{"name":"Rwanda","dial_code":"+250","code":"RW","maxNum":"9"},
|
|
||||||
{"name":"Réunion Island","dial_code":"+262","code":"RE","maxNum":"9"},
|
|
||||||
{"name":"Saint Barthélemy","dial_code":"+590","code":"BL","maxNum":"0"},
|
|
||||||
{"name":"Saint Helena","dial_code":"+290","code":"SH","maxNum":"4"},
|
|
||||||
{"name":"Saint Kitts and Nevis","dial_code":"+1 869","code":"KN","maxNum":"10"},
|
|
||||||
{"name":"Saint Lucia","dial_code":"+1 758","code":"LC","maxNum":"10"},
|
|
||||||
{"name":"Saint Martin","dial_code":"+590","code":"MF","maxNum":"0"},
|
|
||||||
{"name":"Saint Pierre and Miquelon","dial_code":"+508","code":"PM","maxNum":"6"},
|
|
||||||
{"name":"Saint Vincent","dial_code":"+1 784","code":"VC","maxNum":"10"},
|
|
||||||
{"name":"Sao Tome and Principe","dial_code":"+239","code":"ST","maxNum":"7"},
|
|
||||||
{"name":"Somalia","dial_code":"+252","code":"SO","maxNum":"8"},
|
|
||||||
{"name":"Svalbard and Jan Mayen","dial_code":"+47","code":"SJ","maxNum":"0"},
|
|
||||||
{"name":"Syrian Arab Republic","dial_code":"+963","code":"SY","maxNum":"9"},
|
|
||||||
{"name":"Samoa","dial_code":"+685","code":"WS","maxNum":"7"},
|
|
||||||
{"name":"San Marino","dial_code":"+378","code":"SM","maxNum":"10"},
|
|
||||||
{"name":"Saudi Arabia","dial_code":"+966","code":"SA","maxNum":"9"},
|
|
||||||
{"name":"Senegal","dial_code":"+221","code":"SN","maxNum":"9"},
|
|
||||||
{"name":"Serbia","dial_code":"+381","code":"RS","maxNum":"9"},
|
|
||||||
{"name":"Seychelles","dial_code":"+248","code":"SC","maxNum":"7"},
|
|
||||||
{"name":"Sierra Leone","dial_code":"+232","code":"SL","maxNum":"8"},
|
|
||||||
{"name":"Singapore","dial_code":"+65","code":"SG","maxNum":"8"},
|
|
||||||
{"name":"Slovakia","dial_code":"+421","code":"SK","maxNum":"9"},
|
|
||||||
{"name":"Slovenia","dial_code":"+386","code":"SI","maxNum":"8"},
|
|
||||||
{"name":"Solomon Islands","dial_code":"+677","code":"SB","maxNum":"7"},
|
|
||||||
{"name":"South Africa","dial_code":"+27","code":"ZA","maxNum":"9"},
|
|
||||||
{"name":"South Georgia Islands","dial_code":"+500","code":"GS","maxNum":"0"},
|
|
||||||
{"name":"Spain","dial_code":"+34","code":"ES","maxNum":"9"},
|
|
||||||
{"name":"Sri Lanka","dial_code":"+94","code":"LK","maxNum":"9"},
|
|
||||||
{"name":"Sudan","dial_code":"+249","code":"SD","maxNum":"9"},
|
|
||||||
{"name":"Suriname","dial_code":"+597","code":"SR","maxNum":"7"},
|
|
||||||
{"name":"Swaziland","dial_code":"+268","code":"SZ","maxNum":"8"},
|
|
||||||
{"name":"Sweden","dial_code":"+46","code":"SE","maxNum":"9"},
|
|
||||||
{"name":"Switzerland","dial_code":"+41","code":"CH","maxNum":"9"},
|
|
||||||
{"name":"Taiwan","dial_code":"+886","code":"TW","maxNum":"9"},
|
|
||||||
{"name":"Tajikistan","dial_code":"+992","code":"TJ","maxNum":"9"},
|
|
||||||
{"name":"Tanzania, United Republic of","dial_code":"+255","code":"TZ","maxNum":"9"},
|
|
||||||
{"name":"Thailand","dial_code":"+66","code":"TH","maxNum":"9"},
|
|
||||||
{"name":"Togo","dial_code":"+228","code":"TG","maxNum":"8"},
|
|
||||||
{"name":"Tokelau","dial_code":"+690","code":"TK","maxNum":"4"},
|
|
||||||
{"name":"Tonga","dial_code":"+676","code":"TO","maxNum":"5"},
|
|
||||||
{"name":"Trinidad and Tobago","dial_code":"+1 868","code":"TT","maxNum":"10"},
|
|
||||||
{"name":"Tunisia","dial_code":"+216","code":"TN","maxNum":"8"},
|
|
||||||
{"name":"Turkey","dial_code":"+90","code":"TR","maxNum":"10"},
|
|
||||||
{"name":"Turkmenistan","dial_code":"+993","code":"TM","maxNum":"8"},
|
|
||||||
{"name":"Turks and Caicos Islands","dial_code":"+1 649","code":"TC","maxNum":"7"},
|
|
||||||
{"name":"Tuvalu","dial_code":"+688","code":"TV","maxNum":"5"},
|
|
||||||
{"name":"Uganda","dial_code":"+256","code":"UG","maxNum":"9"},
|
|
||||||
{"name":"Ukraine","dial_code":"+380","code":"UA","maxNum":"9"},
|
|
||||||
{"name":"United Arab Emirates","dial_code":"+971","code":"AE","maxNum":"9"},
|
|
||||||
{"name":"United Kingdom","dial_code":"+44","code":"GB","maxNum":"10"},
|
|
||||||
{"name":"United States","dial_code":"+1","code":"US","maxNum":"10"},
|
|
||||||
{"name":"Uruguay","dial_code":"+598","code":"UY","maxNum":"8"},
|
|
||||||
{"name":"Uzbekistan","dial_code":"+998","code":"UZ","maxNum":"9"},
|
|
||||||
{"name":"Vanuatu","dial_code":"+678","code":"VU","maxNum":"7"},
|
|
||||||
{"name":"Venezuela","dial_code":"+58","code":"VE","maxNum":"10"},
|
|
||||||
{"name":"VietNam","dial_code":"+84","code":"VN","maxNum":"9"},
|
|
||||||
{"name":"Wallis and Futuna","dial_code":"+681","code":"WF","maxNum":"5"},
|
|
||||||
{"name":"Yemen","dial_code":"+967","code":"YE","maxNum":"9"},
|
|
||||||
{"name":"Zambia","dial_code":"+260","code":"ZM","maxNum":"9"},
|
|
||||||
{"name":"Zimbabwe","dial_code":"+263","code":"ZW","maxNum":"9"},
|
|
||||||
{"name":"Cocos (Keeling) Islands","dial_code":"+61","code":"CC","maxNum":"0"},
|
|
||||||
{"name":"Guernsey","dial_code":"+44","code":"GG","maxNum":"0"},
|
|
||||||
{"name":"Holy See (Vatican City State)","dial_code":"+379","code":"VA","maxNum":"0"},
|
|
||||||
{"name":"Isle of Man","dial_code":"+44","code":"IM","maxNum":"0"},
|
|
||||||
{"name":"Jersey","dial_code":"+44","code":"JE","maxNum":"0"},
|
|
||||||
{"name":"Pitcairn","dial_code":"+872","code":"PN","maxNum":"0"},
|
|
||||||
{"name":"Timor-Leste","dial_code":"+670","code":"TL","maxNum":"0"},
|
|
||||||
{"name":"Virgin Islands, British","dial_code":"+1 284","code":"VG","maxNum":"0"},
|
|
||||||
{"name":"Virgin Islands, U.S.","dial_code":"+1 340","code":"VI","maxNum":"0"}]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,16 +46,16 @@ public enum FragmentsAvailable {
|
||||||
|
|
||||||
case HISTORY_DETAIL:
|
case HISTORY_DETAIL:
|
||||||
return HISTORY_LIST.isRightOf(fragment) || fragment == HISTORY_LIST;
|
return HISTORY_LIST.isRightOf(fragment) || fragment == HISTORY_LIST;
|
||||||
|
|
||||||
case CONTACTS_LIST:
|
case CONTACTS_LIST:
|
||||||
return HISTORY_DETAIL.isRightOf(fragment) || fragment == HISTORY_DETAIL;
|
return HISTORY_DETAIL.isRightOf(fragment) || fragment == HISTORY_DETAIL;
|
||||||
|
|
||||||
case CONTACT_DETAIL:
|
case CONTACT_DETAIL:
|
||||||
return CONTACTS_LIST.isRightOf(fragment) || fragment == CONTACTS_LIST;
|
return CONTACTS_LIST.isRightOf(fragment) || fragment == CONTACTS_LIST;
|
||||||
|
|
||||||
case CONTACT_EDITOR:
|
case CONTACT_EDITOR:
|
||||||
return CONTACT_DETAIL.isRightOf(fragment) || fragment == CONTACT_DETAIL;
|
return CONTACT_DETAIL.isRightOf(fragment) || fragment == CONTACT_DETAIL;
|
||||||
|
|
||||||
case DIALER:
|
case DIALER:
|
||||||
return CONTACT_EDITOR.isRightOf(fragment) || fragment == CONTACT_EDITOR;
|
return CONTACT_EDITOR.isRightOf(fragment) || fragment == CONTACT_EDITOR;
|
||||||
|
|
||||||
|
@ -64,14 +64,14 @@ public enum FragmentsAvailable {
|
||||||
|
|
||||||
case SETTINGS:
|
case SETTINGS:
|
||||||
return CHAT_LIST.isRightOf(fragment) || fragment == CHAT_LIST;
|
return CHAT_LIST.isRightOf(fragment) || fragment == CHAT_LIST;
|
||||||
|
|
||||||
case ABOUT:
|
case ABOUT:
|
||||||
case ACCOUNT_SETTINGS:
|
case ACCOUNT_SETTINGS:
|
||||||
return SETTINGS.isRightOf(fragment) || fragment == SETTINGS;
|
return SETTINGS.isRightOf(fragment) || fragment == SETTINGS;
|
||||||
|
|
||||||
case CHAT:
|
case CHAT:
|
||||||
return CHAT_LIST.isRightOf(fragment) || fragment == CHAT_LIST;
|
return CHAT_LIST.isRightOf(fragment) || fragment == CHAT_LIST;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -80,17 +80,17 @@ public enum FragmentsAvailable {
|
||||||
public boolean shouldAddItselfToTheRightOf(FragmentsAvailable fragment) {
|
public boolean shouldAddItselfToTheRightOf(FragmentsAvailable fragment) {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case HISTORY_DETAIL:
|
case HISTORY_DETAIL:
|
||||||
return fragment == HISTORY_LIST;
|
return fragment == HISTORY_LIST || fragment == HISTORY_DETAIL;
|
||||||
|
|
||||||
case CONTACT_DETAIL:
|
case CONTACT_DETAIL:
|
||||||
return fragment == CONTACTS_LIST;
|
return fragment == CONTACTS_LIST || fragment == CONTACT_EDITOR|| fragment == CONTACT_DETAIL;
|
||||||
|
|
||||||
case CONTACT_EDITOR:
|
case CONTACT_EDITOR:
|
||||||
return fragment == CONTACT_DETAIL || fragment == CONTACTS_LIST;
|
return fragment == CONTACTS_LIST || fragment == CONTACT_DETAIL || fragment == CONTACT_EDITOR;
|
||||||
|
|
||||||
case CHAT:
|
case CHAT:
|
||||||
return fragment == CHAT_LIST || fragment == CHAT;
|
return fragment == CHAT_LIST || fragment == CHAT;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
import org.linphone.assistant.AssistantActivity;
|
import org.linphone.assistant.AssistantActivity;
|
||||||
|
import org.linphone.core.DialPlan;
|
||||||
import org.linphone.core.LinphoneAccountCreator;
|
import org.linphone.core.LinphoneAccountCreator;
|
||||||
import org.linphone.core.LinphoneAddress;
|
import org.linphone.core.LinphoneAddress;
|
||||||
import org.linphone.core.LinphoneCall;
|
import org.linphone.core.LinphoneCall;
|
||||||
|
@ -658,10 +659,10 @@ public final class LinphoneUtils {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setCountry(AssistantActivity.Country c, EditText dialCode, Button selectCountry, int countryCode) {
|
public static void setCountry(DialPlan c, EditText dialCode, Button selectCountry, int countryCode) {
|
||||||
if( c != null && dialCode != null && selectCountry != null) {
|
if( c != null && dialCode != null && selectCountry != null) {
|
||||||
dialCode.setText(c.dial_code);
|
dialCode.setText(c.getCountryCode());
|
||||||
selectCountry.setText(c.name);
|
selectCountry.setText(c.getCountryName());
|
||||||
} else {
|
} else {
|
||||||
if(countryCode != -1){
|
if(countryCode != -1){
|
||||||
dialCode.setText("+" + countryCode);
|
dialCode.setText("+" + countryCode);
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.linphone.LinphoneUtils;
|
||||||
import org.linphone.LinphonePreferences.AccountBuilder;
|
import org.linphone.LinphonePreferences.AccountBuilder;
|
||||||
import org.linphone.R;
|
import org.linphone.R;
|
||||||
import org.linphone.StatusFragment;
|
import org.linphone.StatusFragment;
|
||||||
|
import org.linphone.core.DialPlan;
|
||||||
import org.linphone.core.LinphoneAccountCreator;
|
import org.linphone.core.LinphoneAccountCreator;
|
||||||
import org.linphone.core.LinphoneAddress;
|
import org.linphone.core.LinphoneAddress;
|
||||||
import org.linphone.core.LinphoneAddress.TransportType;
|
import org.linphone.core.LinphoneAddress.TransportType;
|
||||||
|
@ -70,6 +71,7 @@ import android.view.inputmethod.InputMethodManager;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -95,7 +97,7 @@ private static AssistantActivity instance;
|
||||||
private LinphoneAccountCreator accountCreator;
|
private LinphoneAccountCreator accountCreator;
|
||||||
private CountryListAdapter countryListAdapter;
|
private CountryListAdapter countryListAdapter;
|
||||||
|
|
||||||
public Country country;
|
public DialPlan country;
|
||||||
public String phone_number;
|
public String phone_number;
|
||||||
public String email;
|
public String email;
|
||||||
public String activation_code;
|
public String activation_code;
|
||||||
|
@ -135,7 +137,7 @@ private static AssistantActivity instance;
|
||||||
accountCreator.setDomain(getResources().getString(R.string.default_domain));
|
accountCreator.setDomain(getResources().getString(R.string.default_domain));
|
||||||
accountCreator.setListener(this);
|
accountCreator.setListener(this);
|
||||||
|
|
||||||
countryListAdapter = new CountryListAdapter(R.raw.countries, getApplicationContext());
|
countryListAdapter = new CountryListAdapter(getApplicationContext());
|
||||||
|
|
||||||
mListener = new LinphoneCoreListenerBase() {
|
mListener = new LinphoneCoreListenerBase() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -438,7 +440,7 @@ private static AssistantActivity instance;
|
||||||
|
|
||||||
public String getPhoneWithCountry() {
|
public String getPhoneWithCountry() {
|
||||||
if(country == null || phone_number == null) return "";
|
if(country == null || phone_number == null) return "";
|
||||||
String phoneNumberWithCountry = country.dial_code + phone_number.replace("\\D", "");
|
String phoneNumberWithCountry = country.getCountryCode() + phone_number.replace("\\D", "");
|
||||||
return phoneNumberWithCountry;
|
return phoneNumberWithCountry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -701,51 +703,25 @@ private static AssistantActivity instance;
|
||||||
public class CountryListAdapter extends BaseAdapter implements Filterable {
|
public class CountryListAdapter extends BaseAdapter implements Filterable {
|
||||||
|
|
||||||
private LayoutInflater mInflater;
|
private LayoutInflater mInflater;
|
||||||
private List<Country> allCountries;
|
private DialPlan[] allCountries;
|
||||||
private List<Country> filteredCountries;
|
private List<DialPlan> filteredCountries;
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
public CountryListAdapter(int jsonId, Context ctx) {
|
public CountryListAdapter(Context ctx) {
|
||||||
context = ctx;
|
context = ctx;
|
||||||
allCountries = new ArrayList<Country>();
|
allCountries = LinphoneCoreFactory.instance().getAllDialPlan();
|
||||||
String jsonString = loadJSONFromAsset(R.raw.countries);
|
filteredCountries = new ArrayList<DialPlan>(Arrays.asList(allCountries));
|
||||||
try {
|
|
||||||
JSONArray c = new JSONArray(jsonString);
|
|
||||||
for( int i = 0; i < c.length(); i++) {
|
|
||||||
allCountries.add(new Country(c.getJSONObject(i)));
|
|
||||||
}
|
|
||||||
filteredCountries = allCountries;
|
|
||||||
} catch (JSONException e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInflater(LayoutInflater inf) {
|
public void setInflater(LayoutInflater inf) {
|
||||||
mInflater = inf;
|
mInflater = inf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String loadJSONFromAsset(int id) {
|
|
||||||
String json = null;
|
|
||||||
if (context != null) {
|
|
||||||
try {
|
|
||||||
InputStream is = context.getResources().openRawResource(id);
|
|
||||||
int size = is.available();
|
|
||||||
byte[] buffer = new byte[size];
|
|
||||||
is.read(buffer);
|
|
||||||
is.close();
|
|
||||||
json = new String(buffer, "UTF-8");
|
|
||||||
} catch (IOException ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Country getCountryFromCountryCode(String countryCode) {
|
public DialPlan getCountryFromCountryCode(String countryCode) {
|
||||||
countryCode = (countryCode.startsWith("+")) ? countryCode : "+" + countryCode;
|
countryCode = (countryCode.startsWith("+")) ? countryCode.substring(1) : countryCode;
|
||||||
for (Country c : allCountries) {
|
for (DialPlan c : allCountries) {
|
||||||
if (c.dial_code.compareTo(countryCode) == 0)
|
if (c.getCountryCallingCode().compareTo(countryCode) == 0)
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -757,7 +733,7 @@ private static AssistantActivity instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Country getItem(int position) {
|
public DialPlan getItem(int position) {
|
||||||
return filteredCountries.get(position);
|
return filteredCountries.get(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -776,14 +752,14 @@ private static AssistantActivity instance;
|
||||||
view = mInflater.inflate(R.layout.country_cell, parent, false);
|
view = mInflater.inflate(R.layout.country_cell, parent, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Country c = filteredCountries.get(position);
|
DialPlan c = filteredCountries.get(position);
|
||||||
|
|
||||||
TextView name = (TextView) view.findViewById(R.id.country_name);
|
TextView name = (TextView) view.findViewById(R.id.country_name);
|
||||||
name.setText(c.name);
|
name.setText(c.getCountryName());
|
||||||
|
|
||||||
TextView dial_code = (TextView) view.findViewById(R.id.country_prefix);
|
TextView dial_code = (TextView) view.findViewById(R.id.country_prefix);
|
||||||
if (context != null)
|
if (context != null)
|
||||||
dial_code.setText(String.format(context.getString(R.string.country_code),c.dial_code));
|
dial_code.setText(String.format(context.getString(R.string.country_code),c.getCountryCallingCode()));
|
||||||
|
|
||||||
view.setTag(c);
|
view.setTag(c);
|
||||||
return view;
|
return view;
|
||||||
|
@ -794,9 +770,10 @@ private static AssistantActivity instance;
|
||||||
return new Filter() {
|
return new Filter() {
|
||||||
@Override
|
@Override
|
||||||
protected FilterResults performFiltering(CharSequence constraint) {
|
protected FilterResults performFiltering(CharSequence constraint) {
|
||||||
ArrayList<Country> filteredCountries = new ArrayList<Country>();
|
ArrayList<DialPlan> filteredCountries = new ArrayList<DialPlan>();
|
||||||
for (Country c : allCountries) {
|
for (DialPlan c : allCountries) {
|
||||||
if (c.name.toLowerCase().contains(constraint) || c.dial_code.contains(constraint)){
|
if (c.getCountryName().toLowerCase().contains(constraint)
|
||||||
|
|| c.getCountryCallingCode().contains(constraint)) {
|
||||||
filteredCountries.add(c);
|
filteredCountries.add(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -808,32 +785,10 @@ private static AssistantActivity instance;
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||||
filteredCountries = (List<Country>) results.values;
|
filteredCountries = (List<DialPlan>) results.values;
|
||||||
CountryListAdapter.this.notifyDataSetChanged();
|
CountryListAdapter.this.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This class represents a Country. There's a name, dial_code, code and max number of digits.
|
|
||||||
* It is constructed from a JSON object containing all these parameters.
|
|
||||||
*/
|
|
||||||
public class Country {
|
|
||||||
public String name;
|
|
||||||
public String dial_code;
|
|
||||||
public String code;
|
|
||||||
public int maxNum;
|
|
||||||
|
|
||||||
public Country(JSONObject obj ){
|
|
||||||
try {
|
|
||||||
name = obj.getString("name");
|
|
||||||
dial_code = obj.getString("dial_code");
|
|
||||||
code = obj.getString("code");
|
|
||||||
maxNum = obj.getInt("maxNum");
|
|
||||||
} catch (JSONException e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.linphone.assistant;
|
package org.linphone.assistant;
|
||||||
|
|
||||||
import org.linphone.R;
|
import org.linphone.R;
|
||||||
|
import org.linphone.core.DialPlan;
|
||||||
|
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -58,7 +59,7 @@ public class CountryListFragment extends Fragment implements AdapterView.OnItemC
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
AssistantActivity.Country c = (AssistantActivity.Country)view.getTag();
|
DialPlan c = (DialPlan) view.getTag();
|
||||||
AssistantActivity.instance().country = c;
|
AssistantActivity.instance().country = c;
|
||||||
AssistantActivity.instance().onBackPressed();
|
AssistantActivity.instance().onBackPressed();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.linphone.LinphoneManager;
|
||||||
import org.linphone.LinphonePreferences;
|
import org.linphone.LinphonePreferences;
|
||||||
import org.linphone.LinphoneUtils;
|
import org.linphone.LinphoneUtils;
|
||||||
import org.linphone.R;
|
import org.linphone.R;
|
||||||
|
import org.linphone.core.DialPlan;
|
||||||
import org.linphone.core.LinphoneAccountCreator;
|
import org.linphone.core.LinphoneAccountCreator;
|
||||||
import org.linphone.core.LinphoneAccountCreator.LinphoneAccountCreatorListener;
|
import org.linphone.core.LinphoneAccountCreator.LinphoneAccountCreatorListener;
|
||||||
import org.linphone.core.LinphoneAccountCreator.Status;
|
import org.linphone.core.LinphoneAccountCreator.Status;
|
||||||
|
@ -145,11 +146,19 @@ public class CreateAccountFragment extends Fragment implements CompoundButton.On
|
||||||
if (previousPhone != null ) {
|
if (previousPhone != null ) {
|
||||||
phoneNumberEdit.setText(previousPhone);
|
phoneNumberEdit.setText(previousPhone);
|
||||||
}
|
}
|
||||||
AssistantActivity.Country c = AssistantActivity.instance().getCountryListAdapter()
|
DialPlan c = AssistantActivity.instance().country;
|
||||||
.getCountryFromCountryCode(String.valueOf(countryCode));
|
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
AssistantActivity.instance().country = c;
|
selectCountry.setText(c.getCountryName());
|
||||||
selectCountry.setText(c.name);
|
dialCode.setText(c.getCountryCallingCode().contains("+") ?
|
||||||
|
c.getCountryCallingCode() : "+" + c.getCountryCallingCode());
|
||||||
|
} else {
|
||||||
|
c = AssistantActivity.instance().getCountryListAdapter()
|
||||||
|
.getCountryFromCountryCode(String.valueOf(countryCode));
|
||||||
|
if (c != null) {
|
||||||
|
selectCountry.setText(c.getCountryName());
|
||||||
|
dialCode.setText(c.getCountryCallingCode().contains("+") ?
|
||||||
|
c.getCountryCallingCode() : "+" + c.getCountryCallingCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Allow user to enter a username instead use the phone number as username
|
//Allow user to enter a username instead use the phone number as username
|
||||||
|
@ -466,11 +475,11 @@ public class CreateAccountFragment extends Fragment implements CompoundButton.On
|
||||||
field.addTextChangedListener(new TextWatcher() {
|
field.addTextChangedListener(new TextWatcher() {
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
if (field.equals(dialCode)) {
|
if (field.equals(dialCode)) {
|
||||||
AssistantActivity.Country c = AssistantActivity.instance().getCountryListAdapter()
|
DialPlan c = AssistantActivity.instance().getCountryListAdapter()
|
||||||
.getCountryFromCountryCode(dialCode.getText().toString());
|
.getCountryFromCountryCode(dialCode.getText().toString());
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
AssistantActivity.instance().country = c;
|
AssistantActivity.instance().country = c;
|
||||||
selectCountry.setText(c.name);
|
selectCountry.setText(c.getCountryName());
|
||||||
} else {
|
} else {
|
||||||
selectCountry.setText(R.string.select_your_country);
|
selectCountry.setText(R.string.select_your_country);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.linphone.LinphonePreferences;
|
||||||
import org.linphone.LinphoneUtils;
|
import org.linphone.LinphoneUtils;
|
||||||
import org.linphone.R;
|
import org.linphone.R;
|
||||||
import org.linphone.compatibility.Compatibility;
|
import org.linphone.compatibility.Compatibility;
|
||||||
|
import org.linphone.core.DialPlan;
|
||||||
import org.linphone.core.LinphoneAccountCreator;
|
import org.linphone.core.LinphoneAccountCreator;
|
||||||
import org.linphone.core.LinphoneCoreFactory;
|
import org.linphone.core.LinphoneCoreFactory;
|
||||||
import org.linphone.core.LinphoneProxyConfig;
|
import org.linphone.core.LinphoneProxyConfig;
|
||||||
|
@ -113,11 +114,19 @@ public class LinphoneLoginFragment extends Fragment implements CompoundButton.On
|
||||||
countryCode = proxyConfig.lookupCCCFromIso(countryIso.toUpperCase());
|
countryCode = proxyConfig.lookupCCCFromIso(countryIso.toUpperCase());
|
||||||
|
|
||||||
|
|
||||||
AssistantActivity.Country c = AssistantActivity.instance().getCountryListAdapter()
|
DialPlan c = AssistantActivity.instance().getCountryListAdapter()
|
||||||
.getCountryFromCountryCode(String.valueOf(countryCode));
|
.getCountryFromCountryCode(String.valueOf(countryCode));
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
AssistantActivity.instance().country = c;
|
selectCountry.setText(c.getCountryName());
|
||||||
selectCountry.setText(c.name);
|
dialCode.setText(c.getCountryCallingCode().contains("+") ?
|
||||||
|
c.getCountryCallingCode() : "+" + c.getCountryCallingCode());
|
||||||
|
} else {
|
||||||
|
c = AssistantActivity.instance().country;
|
||||||
|
if (c != null) {
|
||||||
|
selectCountry.setText(c.getCountryName());
|
||||||
|
dialCode.setText(c.getCountryCallingCode().contains("+") ?
|
||||||
|
c.getCountryCallingCode() : "+" + c.getCountryCallingCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
phoneNumberLayout.setVisibility(View.VISIBLE);
|
phoneNumberLayout.setVisibility(View.VISIBLE);
|
||||||
|
@ -182,10 +191,10 @@ public class LinphoneLoginFragment extends Fragment implements CompoundButton.On
|
||||||
field.addTextChangedListener(new TextWatcher() {
|
field.addTextChangedListener(new TextWatcher() {
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
if (field.equals(dialCode)) {
|
if (field.equals(dialCode)) {
|
||||||
AssistantActivity.Country c = AssistantActivity.instance().getCountryListAdapter().getCountryFromCountryCode(dialCode.getText().toString());
|
DialPlan c = AssistantActivity.instance().getCountryListAdapter().getCountryFromCountryCode(dialCode.getText().toString());
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
AssistantActivity.instance().country = c;
|
AssistantActivity.instance().country = c;
|
||||||
selectCountry.setText(c.name);
|
selectCountry.setText(c.getCountryName());
|
||||||
} else {
|
} else {
|
||||||
selectCountry.setText(R.string.select_your_country);
|
selectCountry.setText(R.string.select_your_country);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 36554835ff3b775cc88f3fb18b9fc980c8c2b858
|
Subproject commit 5cbf79d6d7f0fa20460667fbbe1c5f2bc44be8e5
|
Loading…
Reference in a new issue