xml – Android: How to fill RelativeLayout to full width of screen?-ThrowExceptions

Exception or error: I am creating an Android app which has a main RelativeLayout and some LinearLayout within it. Now i have this problem. When dragging items to the editor, e.g. a LinearLayout, it doesn’t fit to the full width of the screen. How can I make this possible? This is my XML: <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” …

Android: Linear Layout new Line-ThrowExceptions

Exception or error: I created a LinearLayout like below with TextView. The Text is variable. If the Elements gets bigger than the Layout width it gets nasty. I want to have the text flow to a new line just one would do when writing a book. Is this possible? <LinearLayout android:layout_width=”wrap_content” android:layout_height=”wrap_content” > <TextView android:id=”@+id/textView1″ …

android – How to put RelativeLayout inside CoordinatorLayout-ThrowExceptions

Exception or error: I’m trying to recreate the search box as it is in Airbnb Android app. So I’m using CoorinatorLayout with Toolbar and RecyclerView. But when I insert something inside the Coordinator besides those two things, it doesn’t show up. Here is my code: <android.support.design.widget.CoordinatorLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:id=”@+id/slidingLayout” android:layout_width=”match_parent” android:layout_height=”match_parent”> <android.support.design.widget.AppBarLayout android:id=”@+id/appbar” android:layout_width=”match_parent” android:layout_height=”wrap_content”> …

Android xml merge layout error on inflate-ThrowExceptions

Exception or error: I have a CustomView class and I want to use xml layout for it. So, my class extends RelativeLayout, inflates xml layout and tries to attach it to self. public class CustomView extends RelativeLayout { public CustomView (Context context) { super(context); LayoutInflater.from(context).inflate(R.layout.layers_list_item, this, true); } } If my xml layout has some …

debugging – Is there an Android tool to find the name of a layout for a running app?-ThrowExceptions

Exception or error: Background I have been recently hired to maintain a very large program (only two Activities, about a hundred Fragments, and several hundred layouts). Furthermore, most of the content of the layouts (images and text) as well as the order that the layouts appear is dynamically determined via the company’s Web API. Unfortunately …

Android TextView: Getting "W/StaticLayout: maxLineHeight should not be -1. maxLines:1 lineCount:1" when setting text-ThrowExceptions

Exception or error: I’m setting some text on a TextView every 0.5 seconds based on a timer. Everytime, when the timer runs and the text is set, I’m getting this warning message being spammed in my console. W/StaticLayout: maxLineHeight should not be -1. maxLines:1 lineCount:1 XML Code: <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent”> <TextView android:id=”@+id/title_text” …