For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains hidden or 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 class EmployeeLinkedList { | |
private EmployeeNode head; | |
private int size; | |
public void addToFront(Employee employee) { | |
EmployeeNode node = new EmployeeNode(employee); | |
node.setNext(head); | |
head = node; | |
size++; |
This file contains hidden or 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
// [START display_welcome_message] | |
private void displayWelcomeMessage() { | |
// [START get_config_values] | |
String welcomeMessage = mFirebaseRemoteConfig.getString(WELCOME_MESSAGE_KEY); | |
String versionName = mFirebaseRemoteConfig.getString(VERSION_NAME_KEY); | |
if (versionName.equals(version) && mFirebaseRemoteConfig.getBoolean(CREATE_FORCE_UPDATE_DIALOG_KEY)) { | |
Log.e(TAG, "true"); |
This file contains hidden or 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
//Get the version name | |
private String getVersionName(Context context) { | |
PackageInfo pInfo = null; | |
try { | |
pInfo = context.getPackageManager().getPackageInfo(getPackageName(), 0); | |
} catch (PackageManager.NameNotFoundException e) { | |
e.printStackTrace(); | |
} | |
return pInfo.versionName; | |
} |
This file contains hidden or 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
/** | |
* Fetch a welcome message from the Remote Config service, and then activate it. | |
*/ | |
private void fetchWelcome() { | |
mWelcomeTextView.setText(mFirebaseRemoteConfig.getString(LOADING_PHRASE_CONFIG_KEY)); | |
// [START fetch_config_with_callback] | |
mFirebaseRemoteConfig.fetchAndActivate() | |
.addOnCompleteListener(this, new OnCompleteListener<Boolean>() { | |
@Override |
This file contains hidden or 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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
mWelcomeTextView = findViewById(R.id.textView); | |
versionNameTextView = findViewById(R.id.version_name); | |
// Get Remote Config instance. | |
mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance(); |
This file contains hidden or 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
// Remote Config keys | |
private static final String LOADING_PHRASE_CONFIG_KEY = "loading_phrase"; | |
private static final String WELCOME_MESSAGE_KEY = "welcome_message"; | |
private static final String CREATE_FORCE_UPDATE_DIALOG_KEY = "create_force_update_dialog"; | |
private static final String VERSION_NAME_KEY = "version_name"; | |
String MY_APP_URL = "https://play.google.com/store/apps/details?id=com.technoidtintin.android.moviesmela"; | |
String version; |
This file contains hidden or 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
<defaultsMap> | |
<entry> | |
<key>loading_phrase</key> | |
<value>Fetching config</value> | |
</entry> | |
<entry> | |
<key>create_force_update_dialog</key> | |
<value>false</value> | |
</entry> | |
<entry> |
This file contains hidden or 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" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<TextView | |
android:id="@+id/textView" |