Tag: android-layout

Image blurry on another device

First of all, I want to apologize in advance since I’m sure that this kind of question has been asked before, but even though I was looking for about 2 weeks at those questions I could not figure out what I’m doing wrong. This is where I load the image in the activity: ImageView image […]

ScrollView in both directions android

I have a layout with scrollview: <?xml version=”1.0″ encoding=”utf-8″?> <ScrollView xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fillViewport=”true” android:fadingEdge=”none” android:overScrollMode=”never” > <LinearLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:orientation=”vertical” android:weightSum=”100″ android:background=”@color/antiquewhite”> <LinearLayout android:id=”@+id/top_layou” android:layout_width=”match_parent” android:layout_height=”0dp” android:orientation=”vertical” android:layout_weight=”15″ android:layout_marginLeft=”40dp” android:layout_marginRight=”40dp” android:layout_marginTop=”25dp” android:background=”@color/bisque”> <TextView android:id=”@+id/title_text_view” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_marginLeft=”70dp” android:layout_marginTop=”15dp” android:text=”@string/user_information_text” android:textSize=”26dp” android:textStyle=”bold” android:textColor=”@color/black” /> <TextView android:id=”@+id/subtitle_text_view” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_marginLeft=”70dp” android:layout_marginTop=”5dp” android:text=”@string/user_information_subtitle_text” android:textSize=”20dp” android:textStyle=”bold” android:textColor=”@color/black”/> </LinearLayout> […]

Android TextView not selectable in CoordinatorLayout? (TextView does not support text selection. Selection cancelled)

This is the error I get: W/TextView: TextView does not support text selection. Selection cancelled. I am stunned, because other Textviews I have implemented before in a RelativeLayout have had text selectable when I have the property android:textIsSelectable=”true” – however, doesn’t work this time. This code is placed under app_bar_main.xml using an include keyword in […]

Difference between foo.setVisibility(View.GONE) and parent.removeView(foo)

If foo is a view, what is the difference between foo.setVisibility(View.GONE) and fooParent.removeView(foo)? I am particularly interested in memory consumption of the view, before and after both statements. Does a view with visibility set to GONE consume memory ?

Showing Android Wear style AlertDialog

I’m looking for a way to recreate the alert dialog in the Setting application of Android Wear: Which is swipe to dismissable. But instead, what I got is this: Just a barebone Android dialog. How can I show the AlertDialog in the Settings.apk style? (Which I think must be default for Android Wear application)

Scrollable EditText inside ScrollView

I searched all posts regarding to this subject but still I could not find any solution. I have one big layout and it is scrollable with ScrollView and it has also EditText with scrollable . If I try to scroll edittext , layout is starting to scrolling. How I can solve it? <?xml version=”1.0″ encoding=”utf-8″?> […]

Toolbar Search Suggestions Theming

I’m trying to change search suggestions to “light theme”. I’m using appcompat-v7:22.2.0 library and read about new feature for customizing search view widget (android.support.v7.widget.SearchView). FIRST TRY SECTION Toolbar <android.support.v7.widget.Toolbar xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:background=”?attr/colorPrimary” android:minHeight=”?attr/actionBarSize” app:popupTheme=”@style/ThemeOverlay.AppCompat.Light” app:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar” /> Main Theme <style name=”Main.Theme” parent=”Theme.AppCompat.Light.NoActionBar”> <item name=”colorPrimary”>@color/red</item> <item name=”colorPrimaryDark”>@color/red_dark</item> <item name=”searchViewStyle”>@style/Main.Theme.SearchView</item> </style> SearchView Theme <style name=”Main.Theme.SearchView” parent=”Widget.AppCompat.Light.SearchView”> […]

Single XML, Multiple Activity & there Performance

I have some simple questions for Android Users. If I use Single XML for Multiple Activity, What issues might come ?? How it ll help in Application PERFORMANCE, if we use this kind of approach ?? for example : If have same XML layouts A,B,C for A,B,C Activity, Instead of using multiple layout I want […]

How to change EditText pointer color (not cursor)

I’m trying to make the pointer color of EditText to become blue. I’m able to make the underline and the cursor to become blue, but the droplet looking pointer is still grey. I google a bit, but all the links that appear only talk about how to change the cursor, not the pointer. So if […]

java.lang.VerifyError: Expecting a stackmap frame at branch target 57

A perfectly working application project has started giving this error in Android Studio. I have tried various things like changing the structure of Main.xml file, changing Google Play Services version, etc. but nothing has helped. This error show up in the display tab and I have tried using api 18 for the viewing. Also for […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.