For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
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
# Android Studio | |
.gradle | |
/local.properties | |
.DS_Store | |
/build | |
/captures | |
app/build/ | |
gradle/ | |
*.iml | |
.idea |
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
<?xml version="1.0"?> | |
<string-array name="cities"> | |
<item>Абаза, Хакасия</item> | |
<item>Абакан, Хакасия</item> | |
<item>Абдулино, Оренбургская область</item> | |
<item>Абинск, Краснодарский край</item> | |
<item>Агидель, Башкортостан</item> | |
<item>Агрыз, Татарстан</item> | |
<item>Адыгейск, Адыгея</item> | |
<item>Азнакаево, Татарстан</item> |
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 String getAgeWithDeclination(double age){ | |
String result; | |
List<Double> units = Arrays.asList(2d, 3d, 4d); | |
List<Double> dozens = Arrays.asList(11d, 12d, 13d, 14d); | |
if(age != 11 && age % 10 == 1) { | |
result = age + " год"; | |
} else if(age % 1 != 0d || (units.contains(age % 10) && !dozens.contains(age % 100))) { | |
result = age + " года"; | |
} else { |
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
package com.github.example; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.net.Uri; | |
import android.text.TextUtils; | |
import android.util.Log; | |
import androidx.annotation.Nullable; | |
import androidx.core.content.FileProvider; |
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
import android.os.CountDownTimer | |
import java.util.concurrent.TimeUnit | |
/** | |
* Countdown timer helper | |
* @author Ivan V on 23.04.2020. | |
* @version 1.0 | |
*/ | |
class SimpleTimer { |
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
private void onClickBnvMenu() { | |
bnvMenu.setOnNavigationItemSelectedListener(item -> { | |
final int itemId = item.getItemId(); | |
if (selectedCategoryId == itemId) { | |
return false; | |
} | |
switch (itemId) { | |
case R.id.item_feed: | |
// Do something |
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
/** | |
* Sticky dialog for [RecyclerView]. | |
* Create instance when RecyclerView will be initialized and | |
* call [StickyDialog.show] when a user clicked by item in a list | |
* | |
* @author Ivan V on 31.07.2020. | |
* @version 1.0 | |
*/ | |
class StickyDialog : DialogFragment { |