title: How can i set a default country code on my Android application
body: <p>I want to make a certain country code to becomes default but right now it comes in ascending order. </p>
  
  <p>How can I achieve that?</p>
  
  <p>Here is sample code:</p>
  
  <pre><code> private void initViews() {
  
          registrationBean = new RegistrationBean();
  
          viewFlipper = (ViewFlipper) findViewById(R.id.viewflipper_registration);
          viewFlipper.setDisplayedChild(0);
  
          llVerification = (LinearLayout) findViewById(R.id.ll_registration_mobile_otp);
          txtVerificationLabel = (TextView) findViewById(R.id.txt_registration_mobile_otp_label);
  
          spinnerCountryCodes = (Spinner) findViewById(R.id.spinner_registration_mobile_country_code);
          countryListBean = AppConstants.getCountryBean();
          Collections.sort(countryListBean.getCountries());
          List&lt;String&gt; countryDialCodes = new ArrayList&lt;&gt;();
          for (CountryBean bean : countryListBean.getCountries()) {
              countryDialCodes.add(bean.getDialCode());
          }
  </code></pre>