Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
caa64fda6f | |||
6a1c2f032b | |||
ac7db53812 |
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -135,22 +135,25 @@ public class CurrencyDetailsActivity extends AppCompatActivity {
|
|||||||
Objects.requireNonNull(getSupportActionBar()).setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME |
|
Objects.requireNonNull(getSupportActionBar()).setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME |
|
||||||
ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_USE_LOGO);
|
ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_USE_LOGO);
|
||||||
|
|
||||||
Bitmap result = Bitmap.createBitmap(150, 150, currency.getIcon().getConfig());
|
if(currency.getIcon() != null)
|
||||||
|
{
|
||||||
|
Bitmap result = Bitmap.createBitmap(150, 150, currency.getIcon().getConfig());
|
||||||
|
|
||||||
Paint paint = new Paint();
|
Paint paint = new Paint();
|
||||||
paint.setStyle(Paint.Style.FILL);
|
paint.setStyle(Paint.Style.FILL);
|
||||||
paint.setColor(ContextCompat.getColor(this, R.color.white));
|
paint.setColor(ContextCompat.getColor(this, R.color.white));
|
||||||
|
|
||||||
Canvas canvas = new Canvas(result);
|
Canvas canvas = new Canvas(result);
|
||||||
canvas.drawCircle(result.getHeight()/2, result.getWidth()/2, 75, paint);
|
canvas.drawCircle(result.getHeight()/2, result.getWidth()/2, 75, paint);
|
||||||
canvas.drawBitmap(Bitmap.createScaledBitmap(currency.getIcon(), 100, 100, false), result.getHeight()/2 - 50, result.getWidth()/2 - 50, null);
|
canvas.drawBitmap(Bitmap.createScaledBitmap(currency.getIcon(), 100, 100, false), result.getHeight()/2 - 50, result.getWidth()/2 - 50, null);
|
||||||
|
|
||||||
getSupportActionBar()
|
getSupportActionBar()
|
||||||
.setIcon(new BitmapDrawable(getResources(),
|
.setIcon(new BitmapDrawable(getResources(),
|
||||||
Bitmap.createScaledBitmap(result
|
Bitmap.createScaledBitmap(result
|
||||||
, (int) MoodlBox.convertDpToPx(25, getResources())
|
, (int) MoodlBox.convertDpToPx(25, getResources())
|
||||||
, (int) MoodlBox.convertDpToPx(25, getResources())
|
, (int) MoodlBox.convertDpToPx(25, getResources())
|
||||||
, false)));
|
, false)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*for(int i = 0; i < dataChartList.size(); i++)
|
/*for(int i = 0; i < dataChartList.size(); i++)
|
||||||
|
@ -82,7 +82,8 @@ public class DataCrypter {
|
|||||||
|
|
||||||
} catch(NoSuchPaddingException | NoSuchAlgorithmException
|
} catch(NoSuchPaddingException | NoSuchAlgorithmException
|
||||||
| InvalidKeyException | UnsupportedEncodingException
|
| InvalidKeyException | UnsupportedEncodingException
|
||||||
| InvalidAlgorithmParameterException e) {
|
| InvalidAlgorithmParameterException | BadPaddingException
|
||||||
|
| IllegalBlockSizeException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
classpath 'com.android.tools.build:gradle:3.1.4'
|
||||||
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
Loading…
x
Reference in New Issue
Block a user