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 androidx.fragment.app.FragmentManager | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MutableLiveData | |
import androidx.navigation.NavController | |
import androidx.navigation.fragment.NavHostFragment | |
import com.google.android.material.bottomnavigation.BottomNavigationView | |
import java.util.Stack | |
import kotlin.collections.HashMap | |
class BottomBackStackController { |
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
api.fetchUser(object: Callback{ | |
fun onResponse(userInfo: UserInfo){ | |
userTextView.text = userInfo.name | |
} | |
}) |
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 final class RawCertificatePinner implements OkHttpCertificatePinner{ | |
private static final String CERTIFICATE_TYPE = "BKS"; | |
private static final String DEFAULT_TLS_VERSION = "TLSv1.2"; | |
private final Context context; | |
@RawRes | |
private final int certificate; | |
private final String certificatePassword; |
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
keytool -list -keystore "/user/mert/desktop/certificate.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "/user/mert/bcprov-jdk15on-159.jar" -storetype BKS -storepass mypassword |
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
keytool -importcert -v -trustcacerts -file "/user/mert/testcertificate.cer" -alias mytestalias -keystore "/user/mert/desktop/certificate.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "/user/mert/bcprov-jdk15on-159.jar" -storetype BKS -storepass mypassword | |
keytool -importcert -v -trustcacerts -file "/user/mert/testcertificate2.cer" -alias mytestalias2 -keystore "/user/mert/desktop/certificate.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "/user/mert/bcprov-jdk15on-159.jar" -storetype BKS -storepass mypassword |
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
keytool -importcert -v -trustcacerts -file "/user/mert/testcertificate.cer" -alias mytestalias -keystore "/user/mert/desktop/certificate.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "/user/mert/bcprov-jdk15on-159.jar" -storetype BKS -storepass mypassword |
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
keytool -importcert -v -trustcacerts -file "[YOUR_PUBLIC_CERTIFICATE_PATH]" -alias [YOUR_ALIAS] -keystore "[BKS_TARGET_PATH]" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "[BOUNCY_CASTLE_JAR_PATH]" -storetype BKS -storepass [YOUR_PASSWORD] |
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" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_pressed="true"> | |
<set> | |
<objectAnimator | |
android:duration="200" | |
android:propertyName="translationZ" | |
android:valueTo="6dp" | |
android:valueType="floatType" /> |
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 ScalingLayout extends FrameLayout { | |
//... | |
viewOutline = new ScalingLayoutOutlineProvider(w, h, currentRadius); | |
setOutlineProvider(viewOutline); | |
//.. | |
} |
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 ScalingLayoutOutlineProvider extends ViewOutlineProvider { | |
@Override | |
public void getOutline(View view, Outline outline) { | |
outline.setRoundRect(0, 0, width, height, radius); | |
} | |
} |
NewerOlder