This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Bitmap DownloadImageBitmap(String url) { | |
Bitmap bm = null; | |
try { | |
URL aURL = new URL(url); | |
URLConnection conn = aURL.openConnection(); | |
conn.connect(); | |
InputStream is = conn.getInputStream(); | |
BufferedInputStream bis = new BufferedInputStream(is); | |
bm = BitmapFactory.decodeStream(bis); | |
bis.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spinner spinner = (Spinner) findViewById(R.id.main_spinner); | |
ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(getSupportActionBar().getThemedContext(), | |
R.layout.spinner_list_style, | |
getResources().getStringArray(R.array.countries)); | |
spinnerAdapter.setDropDownViewResource(R.layout.spinner_dropdown_item); | |
spinner.setAdapter(spinnerAdapter); |
OlderNewer