If you want to trace the name of the method that’s being executed, the Java code snippet in this page might help you. This is especially handy when you are debugging by tracking every method that is executed. You can enclose these lines of codes in a function that you call in every method — […]
Java
Android: underline text in your app
When I need to underline text in an app that I’m developing, I like doing it programmatically. The code is in the Java file, not in the XML. Maybe we should make a function for this where we pass the ID of the TextView whose content we’d like to underline.
1 2 3 |
TextView myTextView = (TextView) findViewById(R.id.myTextViewID); String htmlString = "<u>" + myTextView.getText() + "</u>"; myTextView.setText(Html.fromHtml(htmlString)); |
Disadvantages in this method: […]
Java: Strings
First off, if you are in need of a good Java programming reference book, I suggest that you try Head First Java. In this blog entry, basics in Strings in Java programming will be briefly discussed. Assumption: You have already set up your Java development kit on your computer. (Environmental Variables, paths, etc…)
PDF Download: Head First Java (2nd Edition) – by Katy Sierra and Bert Bates
Learning Java? Great, this book will help you. I uploaded this Java Programming PDF to share with IT Elective 1 (Object Oriented Programming with Java) classmates. 🙂 I searched for it in Google, and I’m lucky to find this free e-book of Head First Java – Second Edition. I can’t remember where I got it […]