Posts by Laura Suciu

  1. Home
  2. chevron_right
  3. Laura Suciu

Android Parse JSON file from Assets

commentNo Comments
Under src/main add new directory named “assets“. Inside this directory add your json file. Create a Utils class to add the method that will read your json file from assets. import android.content.Context; import android.util.Log; import; import; public class…

Android Bottom Border Line

commentNo Comments
The simplest way to add a bottom border line to a view is this one. If you search on Google and StackOverflow you will find many ways to do this, but they seemed overly complex compared to this one. So…

Xamarin Forms: Label LineBreakMode

commentNo Comments
You can set a LineBreakMode attribute to a Label that can have the following values: TailTruncation HeadTruncation MiddleTruncation CharacterWrap WordWrap NoWrap TailTruncation If you have a text that is to large to fit the width of your label, you can…

Kotlin RecyclerView with Click Listener

commentNo Comments
Prerequisites : kotlin_version = ‘1.3.31’ In app – build.gradle: implementation ‘androidx.appcompat:appcompat:1.0.2’implementation ‘androidx.constraintlayout:constraintlayout:1.1.3’ In this post we will write in Kotlin a very simple example for RecylcerView with a click listener. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/my_recycler_view"…

Kotlin ListView with ViewHolder

commentNo Comments
In this post we will create a ListView with ViewHolder adapter but we will write the code in Kotlin. For creating xml files for ListView and list items, follow the steps from this post. Next, you have to create a…