I have recently started learning android development properly, after a while of just skimming the basics, and I am building a basic application that will allow a user to save details about themselves.
The app doesn't really serve any purpose other than as a learning project.
I am using hdodenhof's CircleImageView, found here: https://github.com/hdodenhof/CircleImageView
and what i believe to be the latest version of Picasso found here: http://square.github.io/picasso/
Whenever i try to use Picasso to get an image from a URL, the CircleImageView that i am trying to apply the image to, which has a placeholder src applied to start with, just disappears, which i am assuming means it is removing the placeholder image but never applying the image from the internet.
My latest attempt:
public class settings extends AppCompatActivity {
private CircleImageView profile_picture;
private EditText user_name;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings2);
profile_picture = findViewById(R.id.settings_profile_image);
user_name = findViewById(R.id.settings_enter_user_name);
Button search_player = findViewById(R.id.settings_seach_user_button);
search_player.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String imageURL = "https://i.imgur.com/tGbaZCY.jpg";
Picasso.get().load(imageURL).noFade().fit().into(profile_picture);
}
});
Any and all help is appreciated, let me know if you need me to provide any additional information.
Thanks
Edit:- Typo.
OK, thanks to the people who helped!
Turns out i was just being daft and forgot to add the INTERNET permission.
Whoops.
Thanks.