android-relativelayout

Android layout issue with relative layout and right of property [duplicate]

浪子不回头ぞ 提交于 2019-12-12 01:18:08
问题 This question already has answers here : Place 2 textview beside each other with 2nd textview always visible (2 answers) Constraint Layout - Textview overlaps other views when it grows in size (2 answers) Closed 10 months ago . Today I faced a strange problem, while constructing this in relative layout,(please check below code and two output images) I want to create a textview with dynamic text and image must after the textview and when text is small its works fine but when text increases

TextView's and EdidText's not align as expected

扶醉桌前 提交于 2019-12-11 18:26:15
问题 So im trying to make a simple sign up activity but my Views are aligned not as expected. XML: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity

Partial UI screen up

醉酒当歌 提交于 2019-12-11 18:09:40
问题 In a screen, I have a edit text on top (large contains space for 4-5 line), image view below that and submit button at bottom. on Keyboard up it should not hide my submit button. when keyboard appears i am able to resize the window using android:windowSoftInputMode="adjustResize" which allow me not to hide the submit button but it resize my image also which i don't want. Only submit button should move up when keyboard is visible without resizing image. I tried frame layout also but it didn't

With FrameLayout as root layout, add view on top of another one, with offset of X,Y

雨燕双飞 提交于 2019-12-11 16:37:11
问题 I'd like to place a view on top of an existing view. The view I'm targeting is inside a LinearLayout, which resides in a FrameLayout. I'm thinking there's a way to do this with RelativeLayout because I already have it partially working. I'd like to align the new view to the bottom-left or top-left (as the origin) and then offset X and Y to some precise value that I specify. How can this be achieved? Here's the idea: public static void placeTextRelativeToBottomLeftOfViewAtXY(final FrameLayout

app is crashing when i am inserting background image

妖精的绣舞 提交于 2019-12-11 14:56:11
问题 my app is crashing when I am inserting an image and I am not getting log report too when I am writing android:background="@drawable/logo" my app is crashing <?xml version="1.0" encoding="utf-8"?> <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" android:id="@+id/rootLayout" android:background="

Getting java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams

你离开我真会死。 提交于 2019-12-11 11:42:36
问题 Here I need to add textview at runtime. first I took reference of RelativeLayout to get layout params but unfortunately its throwing ClassCastException at RelativeLayout.LayoutParams params = (android.widget.RelativeLayout.LayoutParams)contentLayout.getLayoutParams() I also checked - FrameLayout to RelativeLayout ClassCastException even if there is no FrameLayout used, but it didn't work. Since after replacing RelativeLayout with FrameLayout, I'm unable to add rule on layoutParams. protected

Align to right side of relative layout does not seem to work

无人久伴 提交于 2019-12-11 10:22:04
问题 I am trying to have 2 textviews one next to the other to the right side of the parent container. Something like: +++++++++++++++++++++++++++++++++++++ (parent container) | TextView2 TextView1 | +++++++++++++++++++++++++++++++++++++ The following does not work but I can't understand why <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="100dp" android:layout_height="match_parent"> <RelativeLayout android:layout_width=

android:unable to make multiline chipgroup

风格不统一 提交于 2019-12-11 08:02:26
问题 I have a chipgroup within a relative layout along with a textview whose code is shown below. <RelativeLayout ... <TextView android:layout_width="30dp" android:layout_height="wrap_content" android:text="TextTitle" android:layout_alignParentStart="true" android:gravity="left" android:layout_marginTop="16dp" android:textColor="@android:color/white" android:textStyle="bold" android:textSize="14sp" android:id="@+id/tv" android:layout_toLeftOf="@id/cg" android:layout_alignBaseline="@id/cg" /> <com

Android-Relative Layout inside Scroll View with fixed header and footer

 ̄綄美尐妖づ 提交于 2019-12-11 07:23:00
问题 I want a page which has a static header and footer with scrollable content inside. This is my layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <LinearLayout android:id="@+id/headerView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" > <ImageView

Coordinator Layout and Relative Layout issue

点点圈 提交于 2019-12-11 01:05:56
问题 When you create a blank Activity in android studio, this is the given layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout 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" android:fitsSystemWindows="true" tools:context="com.example.MainActivity"> <android.support.design