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:drawable="@drawable/background_card_selected" android:state_selected="true" /> | |
<item android:drawable="@drawable/background_card_selected" android:state_pressed="true" /> | |
<item android:drawable="@drawable/background_card_default" /> | |
</selector> |
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
/** | |
* @see [nested scrolling workaround](http://stackoverflow.com/a/17317176) | |
*/ | |
private fun fixMapScrolling() { | |
transparentImage.setOnTouchListener { v, event -> | |
when (event.action) { | |
MotionEvent.ACTION_DOWN -> { | |
// Disallow ScrollView to intercept touch events. | |
scrollView.requestDisallowInterceptTouchEvent(true) |
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
Nexus 5 4.4.4 | |
1. setup: | |
a. need to downgrade to 4.4.4, root | |
b. luckypactcher, GG, xposed | |
c. put libhook.so and android_server and libsubstrate.so in /data/local/tmp/ and install aadbg | |
d. patch with luckypatcher the middle 2 | |
2. adb shell su -> android_server | |
3. adb forward tcp:23946 tcp: 23946 | |
4. adb forward tcp:8700 jdwp:PID_OF_GAME | |
jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700 |
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 | |
cd `dirname $0`/../ | |
projectDir=`pwd` | |
buildDir="$projectDir/build" | |
# release Official apk | |
cd $buildDir | |
touch timestampFile | |
echo "Build release official apk" |
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.sriyank.mdccomponents | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.Toast | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { |
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.exoplayer.cast | |
import android.net.Uri | |
import android.os.Bundle | |
import android.view.Menu | |
import android.view.MenuItem | |
import androidx.appcompat.app.AppCompatActivity | |
import com.google.android.exoplayer2.Player | |
import com.google.android.exoplayer2.SimpleExoPlayer | |
import com.google.android.exoplayer2.ext.cast.CastPlayer |
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
// Adapted from https://gist.github.com/lelandrichardson/de674fe6788d922fc84362fdae530464 | |
@Composable | |
fun ExampleUsage(){ | |
GlideImage(src = "source-path", | |
blurThumbSrc = "fast-to-load-small-thumbnail-path-for-blur effect" | |
){imageBitmap -> | |
if (imageBitmap != null) { | |
Image(bitmap = imageBitmap, | |
// modifier = ... |
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
from contextlib import contextmanager | |
# Helper methods | |
def pprint_dict(d): | |
return '[' + ', '.join([f'{k} = {d[k]}' for k in d]) + ']' | |
def composable_tree(): |
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
name: Build and Test | |
on: | |
workflow_dispatch: | |
jobs: | |
local_test_job: | |
name: Running Local Tests | |
runs-on: ubuntu-latest |
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.annotation.SuppressLint | |
import androidx.compose.animation.animateContentSize | |
import androidx.compose.animation.core.animateDpAsState | |
import androidx.compose.animation.core.tween | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.foundation.lazy.LazyColumn | |
import androidx.compose.foundation.lazy.LazyListState | |
import androidx.compose.foundation.lazy.items | |
import androidx.compose.foundation.lazy.rememberLazyListState |
OlderNewer