We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package com.appy.countrydetail;
import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.mukesh.countrypicker.Country; import com.mukesh.countrypicker.CountryPicker; import com.mukesh.countrypicker.OnCountryPickerListener;
public class MainActivity extends AppCompatActivity implements OnCountryPickerListener {
private TextView countryname,countryiso,countrydialcode,countrycurrency; private ImageView countryflag; private Button pickcountrybtn; private CountryPicker countryPicker; private Activity mActivity; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); intialize(); setListener(); } private void setListener() { pickcountrybtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { countryPicker.showDialog(getFragmentManager()); } }); } private void intialize() { countryname = findViewById(R.id.selectedcountryname); countryiso = findViewById(R.id.Selectedcountryisocode); countrydialcode = findViewById(R.id.Selectedcountrydialcode); pickcountrybtn = findViewById(R.id.countrypickerbutton); countryflag = findViewById(R.id.country_flag); countrycurrency = findViewById(R.id.Selectedcountrycurrency); countryPicker = new CountryPicker.Builder().with(this) .listener(this) .build(); } @Override public void onSelectCountry(Country country){ countryflag.setImageResource(country.getFlag()); countrydialcode.setText(country.getDialCode()); countryiso.setText(country.getCode()); countryname.setText(country.getName()); countrycurrency.setText(country.getCurrency()); }
}
I am getting error here countryPicker.showDialog(getFragmentManager());
And the error is countryPicker.showDialog(getFragmentManager()); ^ class file for android.support.v4.app.FragmentManager not found
when I add this libraray is still showing error
The text was updated successfully, but these errors were encountered:
mukeshsolanki
No branches or pull requests
package com.appy.countrydetail;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.mukesh.countrypicker.Country;
import com.mukesh.countrypicker.CountryPicker;
import com.mukesh.countrypicker.OnCountryPickerListener;
public class MainActivity extends AppCompatActivity implements OnCountryPickerListener {
}
I am getting error here
countryPicker.showDialog(getFragmentManager());
And the error is
countryPicker.showDialog(getFragmentManager());
^
class file for android.support.v4.app.FragmentManager not found
when I add this libraray is still showing error
The text was updated successfully, but these errors were encountered: