Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Wednesday, April 23, 2014

Android Strikethrough HTML not rendering in EditText

I was working on supporting strikethrough in EditText of my app. Using StrikethroughSpan, I was able to show it in the EditText element. This strikethrough is converted to <strike></strike> when you use the toHtml() method.

However, when I try to render the strikethrough back to the EditText, I found the Html.fromHtml method does not support strikethough.

The only way to render the strikethough seems to be through the Webview. 

Saturday, October 12, 2013

Android - Connecting to SQLite through adb

This will only work for the Android emulator or a rooted phone. In unrooted/unlocked phones, the data files are locked.

cd into your platform-tools directory in your terminal
cd C:\Program Files (x86)\Android\android-sdk\platform-tools
Start the emulator and check if adb can detect the emulator
adb devices
Start Shell
adb shell
Connect to sqlite
sqlite3 /data/data/{your_package_name}/databases/{your_db}