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
mEdtPaymentAuthorCreditExpirationDate.addTextChangedListener(new TextWatcher() { | |
@Override | |
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |
mLength = mEdtPaymentAuthorCreditExpirationDate.getText().length(); | |
} | |
@Override | |
public void onTextChanged(CharSequence charSequence, int start, int before, int count) { | |
int currentLength = mEdtPaymentAuthorCreditExpirationDate.getText().length(); | |
boolean ignoreBecauseIsDeleting = false; |
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
mEdtPaymentAuthorCreditExpirationDate.addTextChangedListener(new ExpirationDateFormatWatcher()); | |
import android.text.Editable; | |
import android.text.TextWatcher; | |
public class ExpirationDateFormatWatcher implements TextWatcher { | |
private int mLength; | |
@Override |
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
binding.fragmentCandidateBrowseList.setItemViewCacheSize(30); | |
binding.fragmentCandidateBrowseList.setDrawingCacheEnabled(true); | |
binding.fragmentCandidateBrowseList.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH); |
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 class RealmHelper { | |
public static <T extends RealmObject> void save(T object) { | |
Realm realm = Realm.getDefaultInstance(); | |
try { | |
realm.beginTransaction(); | |
realm.copyToRealmOrUpdate(object); | |
realm.commitTransaction(); | |
} finally { | |
realm.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
public class RealmHelper { | |
public static <T extends RealmObject> void save(T object) { | |
Realm realm = Realm.getDefaultInstance(); | |
try { | |
realm.beginTransaction(); | |
realm.copyToRealmOrUpdate(object); | |
realm.commitTransaction(); | |
} finally { | |
realm.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
package codepath.com.recyclerviewfun; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Contact { | |
private String mName; | |
private boolean mOnline; | |
public Contact(String name, boolean online) { |
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
#!/bin/bash | |
ADB_PATH="/Users/lee/Library/Android/sdk/platform-tools" | |
PACKAGE_NAME="com.yourcompany.app" | |
DB_NAME="default.realm" | |
DESTINATION_PATH="/Users/lee/Downloads/${DB_NAME}" | |
NOT_PRESENT="List of devices attached" | |
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` | |
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then | |
echo "Make sure a device is connected" | |
else |