Skip to main content

Posts

Showing posts with the label androidstudio

Multiple Styles in a TextView on Android

This is a short snippet on how to have multiple syles in a TextView in Android: tvIntroTwo.setText(R.string. text_introtwo , TextView.BufferType. SPANNABLE ); Spannable spannable = (Spannable) tvIntroTwo.getText(); spannable.setSpan( new TextAppearanceSpan(getApplicationContext(), R.style. TextAppearance_IntroTwo ), 0 , 4 , Spanned. SPAN_EXCLUSIVE_EXCLUSIVE ); In styles.xml: < style name= "TextAppearance_IntroTwo" parent= "TextAppearance.AppCompat.Large" > < item name= "android:textColor" >#f3e740</ item > </ style > As for the text, you can try out a long text, then you'll see the style differences.

How To Reset Android Studio on Mac

Just in case you guys have trouble starting Android Studio for some unknown reason such as clearing the Mac OS cache using a third party tool, these are the steps to troubleshoot the problem. Step 1: Close Android Studio. Step 2: Remove all the directories that are related to Android Studio ~/Library/Application Support/AndroidStudioBeta ~/Library/Caches/ AndroidStudioBeta ~/Library/Logs/ AndroidStudioBeta ~/Library/Preferences/ AndroidStudioBeta Step 3: Start Android Studio Simple as that...