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
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
mView = inflater.inflate(R.layout.fragment_base_section, container, false) | |
KeyboardUtil(requireActivity(), mView.coordinatorLayout) | |
return mView | |
} |
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.text.SpannableStringBuilder | |
import android.text.Spanned | |
import android.text.TextPaint | |
import android.text.method.LinkMovementMethod | |
import android.text.style.ClickableSpan | |
import android.view.View | |
import androidx.appcompat.widget.AppCompatTextView | |
fun AppCompatTextView.highLightWord(word: String, onClick: () -> Unit) { | |
val ssBuilder = SpannableStringBuilder(this.text) |
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
// generate app-release.apks | |
java -jar bundletool-all-1.4.0.jar build-apks --local-testing --bundle=app-release.aab --output=app-release.apks --connected-device | |
// Install apk from genrated app-release apks | |
java -jar bundletool-all-1.4.0.jar install-apks --apks app-release.apks |
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.appcompat.app.AppCompatActivity | |
import java.io.BufferedReader | |
import java.io.InputStreamReader | |
import java.net.MalformedURLException | |
import java.net.URL | |
object ContentScrapper { | |
fun getHTMLData(activity: AppCompatActivity,url: String, scrapListener: ScrapListener) { |
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
List<String> getListOfStates() { | |
return [ | |
"Andhra Pradesh", | |
"Arunachal Pradesh", | |
"Assam", | |
"Bihar", | |
"Chhattisgarh", | |
"Goa", | |
"Gujarat", | |
"Haryana", |
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
// Get Your Device IP | |
adb shell "ip addr show wlan0 | grep -e wlan0$ | cut -d\" \" -f 6 | cut -d/ -f 1" | |
// Connect over 5555 | |
adb tcpip 5555 | |
// Connect device over TCP. | |
adb connect 192.168.1.81:5555 |
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
fun <T : ViewModel?> T.createFactory(): ViewModelProvider.Factory { | |
val viewModel = this | |
return object : ViewModelProvider.Factory { | |
@Suppress("UNCHECKED_CAST") | |
override fun <T : ViewModel?> create(modelClass: Class<T>): T = viewModel as T | |
} | |
} |
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/sh | |
# ------------------------------------------------------------------ | |
# [Author] Title | |
# Description | |
# ------------------------------------------------------------------ | |
VERSION=0.1.0 | |
SUBJECT=sms-retriever-hash-generator | |
USAGE="Usage: sms_retriever_hash_v9.sh --package package_name --keystore keystore_file" |
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
<provider | |
android:name="androidx.core.content.FileProvider" | |
android:authorities="${applicationId}.provider" | |
android:exported="false" | |
android:grantUriPermissions="true"> | |
<meta-data | |
android:name="android.support.FILE_PROVIDER_PATHS" | |
android:resource="@xml/filepaths" | |
tools:replace="android:resource" /> | |
</provider> |
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
/** | |
* Enables click support for a TextView from a [fullText] String, which one containing one or multiple URLs. | |
* The [callback] will be called when a click is triggered. | |
*/ | |
fun MaterialTextView.setTextWithLinkSupport( | |
fullText: Spannable, | |
callback: (String) -> Unit | |
) { | |
val spannable = SpannableString(fullText) | |
val matcher = Patterns.WEB_URL.matcher(spannable) |
OlderNewer