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
DOM(https://youtu.be/ipkjfvl40s0) - Document Object Model | |
object as a tree structure | |
DOM is an object-oriented representation of web page | |
Component(https://youtu.be/16rQyEQtpyQ?list=PLC3y8-rFHvwhBRAgFinJR8KHIrCdTkZcZ): | |
Template(view/HTML) + Class(code/typescript/data&methods) + Metadata(information decorator) | |
3 ways of declaring selector | |
1 -> selector: 'app-badwords' -> <app-badwords></app-badwords> in html 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
// https://youtu.be/VWlwkqmTLHc?list=PLQkwcJG4YTCQcFEPuYGuv54nYai_lwil_ | |
// USING TRY-CATCH FOR EXCEPTION HANDLING | |
// wrong | |
lifecycleScope.launch { | |
try { | |
launch { | |
throw Exception("failed") | |
} | |
} catch (e: Exception) { | |
} |
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
class DummyActivity : AppCompatActivity(R.layout.activity_dummy) { | |
private val btn by lazy { | |
findViewById<Button>(R.id.btn) | |
} | |
private val tv by lazy { | |
findViewById<TextView>(R.id.tv) | |
} | |
var aToFragCallback: ActivityToFragCallBack<String>? = null |
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
// exploring funcs & props usage in gradle file | |
// below code is placed in app/build.gradle | |
// executed tasks as `$ ./gradlew showMagics` | |
// https://medium.com/@dmitriileonov/5-gradle-things-that-get-android-developers-confused-ed606b8e8c92 | |
class Foo { | |
def name = "" | |
void name(String newString) { | |
name = newString | |
println "Foo.name() triggered: name: $newString" |
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.bhnetwork.scanit.consumer | |
import kotlinx.coroutines.* | |
import kotlin.random.Random | |
// mistake 1 - getFirstName call happens one after another | |
suspend fun getUserFirstNames(userIds: List<String>): List<String> { | |
val firstNames = mutableListOf<String>() | |
userIds.forEach { | |
firstNames.add(getFirstName(it)) |
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"?> | |
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:color="@color/black_10" | |
tools:targetApi="lollipop"><!-- ripple effect color --> | |
<!-- background color --> | |
<item android:id="@android:id/background"> | |
<shape android:shape="rectangle"> | |
<solid android:color="@android:color/transparent" /> |
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
class DynamicHomeFragment : Fragment() { | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
val color2 = requireActivity().application.resources.getColor(R.color.your_special_color, null) // returns Color.GREEN | |
binding.content.ll3.setBackgroundColor(color2) | |
} | |
} |
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
// | |
// ContentView.swift | |
// SwiftUI-Appu | |
// | |
// Created by Mohammed Audhil S on 18/04/21. | |
// | |
import SwiftUI | |
struct ContentView: View { |
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
Designing Swiggy-app! | |
requirements | |
Kotlin | |
MVVM - MVI etc | |
android arch components | |
Dagger-Hilt, MockK | |
retrofit2 | |
kotlin coroutines |
NewerOlder