This file contains hidden or 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 collections | |
class Grouping { | |
companion object { | |
val products = listOf( | |
Product(10, "first_brand", "some_name", "90", "$"), | |
Product(11, "first_brand", "some_name", "140", "$"), | |
Product(12, "first_brand", "some_name", "100", "$"), | |
Product(13, "first_brand", "some_name", "140", "$"), |
This file contains hidden or 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
Web 2.0 | Web 3.0 | |
---|---|---|
Wildly Read-Write | Portable and Personal | |
Community Focus | Individual Focus | |
Blogs / Wikis | Live-streams / Waves | |
Sharing Content | Consolidating Content | |
Web Applications | Smart Applications | |
Tagging | User Behaviour | |
Cost Per Click | User Engagement | |
Interactive Advertising | Behavioural Advertising | |
Wikipedia | The Semantic Web |
This file contains hidden or 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.filipkowicz.headeritemdecorator | |
/* | |
solution based on - based on Sevastyan answer on StackOverflow | |
changes: | |
- take to account views offsets | |
- transformed to Kotlin | |
- now works on viewHolders |
This file contains hidden or 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
// An Example sealed class for state management | |
sealed class Result<out R> { | |
data class Success<out T>(val data: T? = null) : Result<T>() | |
data class Error(val error: Throwable) : Result<Nothing>() | |
object Loading : Result<Nothing>() | |
} | |
// To asign values to it, inside your viewmodel, you can do something like this | |
private val _someViewModelObject = MutableLiveData<Result<YourDataClass>>() | |
val someViewModelObject: LiveData<Result<YourDataClass>> |
This file contains hidden or 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.project.segunfrancis.chatseparator.util | |
import android.content.SharedPreferences | |
import android.text.Editable | |
import android.text.TextWatcher | |
import android.view.View | |
import android.widget.EditText | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.channels.awaitClose | |
import kotlinx.coroutines.flow.Flow |
This file contains hidden or 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.project.android_kidstories; | |
import android.Manifest; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.TextView; |
This file contains hidden or 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.project.android_kidstories; | |
import android.os.Bundle; | |
import androidx.annotation.NonNull; | |
import androidx.annotation.Nullable; | |
import androidx.fragment.app.Fragment; | |
import androidx.fragment.app.FragmentManager; | |
import androidx.fragment.app.FragmentPagerAdapter; | |
import androidx.viewpager.widget.ViewPager; |
This file contains hidden or 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.example.computer.codechallenge; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.net.http.SslError; | |
import android.support.constraint.Group; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.KeyEvent; |
This file contains hidden or 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.example.computer.butterknifeandfragments; | |
import android.content.Context; | |
import android.support.annotation.NonNull; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ImageView; | |
import android.widget.TextView; |
This file contains hidden or 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.example.computer.butterknifeandfragments; | |
import android.graphics.drawable.Drawable; | |
public class MyData { | |
private Drawable image; | |
private String description; | |
public MyData() { |
NewerOlder