|How to remove the divider in a ListView?|
|What if my text doesn’t fit in a TextView?|
|How to return values from to the caller Activity?|
|Highlight an item in a ListView|
|How to shrink activity layout when virtual keyboard is displayed and hides some of the views?|
|There are several different solutions, one of them is:
– In the AndroidManifest.xml, for the target activity
|If you use Database Room framework for SQLite management and Kotlin:|
|If you are using Kotlin don’t create a new method, you can have compilation errors on the generated class|
|java.lang.IllegalStateException: Cannot access database on the main thread since it may potentially lock the UI for a long period of time.|
|Solution 1: add allowMainThreadQueries
MyApp.database = Room.databaseBuilder(this, AppDatabase::class.java, “MyDatabase”).allowMainThreadQueries().build()
Solution 2: Use another thread
Solution 3: If you use Kotlin 1.3+ you can use coroutines
|How to explore a database in Android Emulator?|
|– You can copy the db files from the device to your computer and use a sqlite browser
– I use: Android Debug Database: https://github.com/amitshekhariitbhu/Android-Debug-Database
|How to add an icon to a button?|
|How to push a button in a LinearLayout to the right?|
|The trick in is the empty view
|How to have an ImageButton transparent?|
|How to clear all the Spannable styles in an EditText?|
|val currentPositionsInputText = contentTextEditBox.selectionStart
|How to prevent an EditBox from expanding?
|How to add a Scrollbar to an EditBox?|
|How to write the text on top left of the EditBox?|
|How to avoid the overlap of the Toolbar with the included layout?|
|How to Highlight blocks of text in an EditBox?|
|Spannable spannable=new SpannableString(string);
// You can add other styles here, like bold, underline, other// if you are using a loop, put the Spannable construction outside the loop or sometimes only the last one will be used
spannable.setSpan(new ForegroundColorSpan(Color.BLUE), start, end, 0);
I just developed an Android application to improve your productivity.
Just Send It, an Android application to send a note with the fewer clicks possible.
An application developed to just Write and Send to your preferred email account.
I released an update to my first Android application developed Give Me Numbers.
User Interface Improved, more colorful
You can choose a separator for the numbers generated