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}.fileprovider" | |
android:grantUriPermissions="true" | |
android:exported="false"> | |
<meta-data | |
android:name="android.support.FILE_PROVIDER_PATHS" | |
android:resource="@xml/filepaths" /> | |
</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
<service | |
android:name=".JobScheduler" | |
android:exported="false"> | |
<intent-filter> | |
<action android:name="com.firebase.jobdispatcher.ACTION_EXECUTE" /> | |
</intent-filter> | |
</service> |
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"?> | |
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
tools:context=".develop.mlkit.MLKitFragment" | |
android:fadeScrollbars="false"> | |
<LinearLayout |
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? { | |
TrackingUtil(requireActivity()).track(TrackingUtil.Screens.Login) | |
return inflater.inflate(R.layout.fragment_login, container, 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
interface ActionHandler { | |
fun handleAction(actionCode: String) | |
} |
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
// Changing colour | |
val layerDrawable = (ImageView)findViewById(R.id.my_drawable).drawable as LayerDrawable | |
val backgroundDrawable = layerDrawable.findDrawableByLayerId(R.id.background_circle) as GradientDrawable | |
backgroundDrawable.setColor(ContextCompat.getColor(context, R.color.my_colour)) | |
// Changing drawable | |
layerDrawable.setDrawableByLayerId(R.id.foreground_icon, ContextCompat.getDrawable(context, R.drawable.new_foreground_icon)) |
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
<style name="Font_Regular" tools:keep="@style/Font_Regular"> | |
<item name="android:fontFamily">@font/the_sans_c4s</item> | |
</style> | |
<style name="Font_Regular_Italic" parent="Font_Regular" tools:keep="@style/Font_Regular_Italic"> | |
<item name="android:textStyle">italic</item> | |
</style> | |
<style name="Font_Bold" parent="Font_Regular" tools:keep="@style/Font_Bold"> | |
<item name="android:textStyle">bold</item> |
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.content.Context | |
import android.support.v4.view.ViewPager | |
import android.util.AttributeSet | |
import android.view.MotionEvent | |
enum class SwipeDirection { BOTH, LEFT, RIGHT, NONE } | |
// https://stackoverflow.com/a/34076649/608312 | |
class LockableViewPager(context: Context, attrs: AttributeSet) : ViewPager(context, attrs) { |
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
<application | |
android:allowBackup="true" | |
android:fullBackupContent="@xml/backup_rules" |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.yourpackagename"> | |
<application | |
android:name=".MainApplication" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name"> | |
<meta-data | |
android:name="DATABASE" |