I am currently having an issue with a mobile app I am developing. The idea behind it being it displays the value of various variables from a passed object. As I have needed to add more and more objects to the layout xml file in order to display everything, the preview has since stopped displaying any objects besides the action bar and trying to start the activity using this layout crashes the app.
I have a feeling this may be due to the layout being larger than the virtual device screen, though there could be another cause i'm totally unaware of. Any help in this matter would be appreciated. This activity currently uses the Relative layout, would it resolve the issue to wrap the Relative layout in a Scrollview to make the activity scrollable?
<?xml version="1.0" encoding="utf-8"?>
<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="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Name"
android:id="#+id/RequestNameTextView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView
android:id="#+id/RequestNameDisplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestNameTextView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_margin="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Student ID"
android:id="#+id/RequestStudentIDTextView"
android:layout_below="#+id/RequestNameDisplay"/>
<TextView
android:id="#+id/RequestStudentIDDisplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestStudentIDTextView"
android:layout_margin="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/RequestLocationTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestStudentIDDisplay"
android:text="Location"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<TextView
android:id="#+id/RequestLocationDisplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestLocationTextView"
android:layout_margin="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/RequestProblemTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestLocationDisplay"
android:text="Problem Description"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<TextView
android:id="#+id/RequestProblemDisplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestProblemTextView"
android:layout_margin="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/RequestStatusTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestProblemDisplay"
android:text="Current Status"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/RequestStatusDisplay"
android:layout_below="#+id/RequestStatusTextView"
android:layout_margin="10dp"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView
android:id="#+id/RequestAssignmentTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestStatusDropDown"
android:text="Assigned To"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/RequestAssignmentDisplay"
android:layout_below="#+id/RequestAssignmentTextView"
android:layout_margin="10dp"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView
android:id="#+id/RequestStatusUpdateTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestAssignmentDisplay"
android:text="Update Status to:"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/RequestStatusDropDown"
android:layout_below="#+id/RequestStatusUpdateTextView"
android:layout_margin="10dp"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView
android:id="#+id/RequestAssignmentUpdateTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RequestStatusDropDown"
android:text="Assign Request To:"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/RequestAssignmentDropDown"
android:layout_below="#+id/RequestAssignmentUpdateTextView"
android:layout_margin="10dp"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<Button
android:id="#+id/RequestSaveChangesButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="Save Changes" />
</RelativeLayout>
It is because your Relative Layout having Circular dependencies. From RequestAssignmentTextView to RequestStatusDropDown, your are having a circular dependency. Just change your 'below' element of RequestAssignmentTextView to avoid this error.
Related
Others too have this issue, but mine is unique (I think) in that this error only occurs when I open the keyboard within the app like this. It does not happen when the keyboard is not opened.
Again, the error is:
W/Ads: Not enough space to show ad. Needs 320x50 dp, but only has 384x0 dp.
Here is the XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<EditText
android:id="#+id/input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="Enter your Number"
android:textAlignment="center"
android:layout_gravity="center"
android:inputType="text"
android:ems="25"
android:textColor="#color/colorPrimary"
android:textSize="20sp"
android:maxLength="31"
android:layout_marginTop="30dp"
android:layout_marginBottom="45dp"/>
<TextView
android:id="#+id/from"
android:text="#string/from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#color/colorPrimary"
android:textSize="16sp" />
<Spinner
android:id="#+id/spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:entries="#array/spinner_entries1"
android:background="#null"
android:layout_marginBottom="25dp"/>
<TextView
android:id="#+id/to"
android:text="#string/to"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#color/colorPrimary"
android:textSize="16sp" />
<Spinner
android:id="#+id/spinner2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#null"
android:cursorVisible="false"
android:entries="#array/spinner_entries2"
android:layout_marginBottom="20dp"/>
<EditText
android:id="#+id/output"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center"
android:inputType="text"
android:ems="25"
android:textColor="#color/colorPrimary"
android:textSize="20sp"
android:maxLength="31"
android:layout_marginBottom="30dp" />
<Button
android:id="#+id/button"
android:text="#string/button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#color/colorPrimary"
android:textColor="#FFFFFF"
android:onClick="convert"
android:layout_gravity="center" />
<com.google.android.gms.ads.AdView
android:id="#+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
ads:adSize="BANNER"
ads:adUnitId="#string/admob_id"
android:layout_marginTop="50dp"
/>
</LinearLayout>
How do I go about fixing this?
EDIT: I wouldn't bother fixing this, because the ad returns back to normal when the keyboard goes away, BUT Views flicker when the keyboard 'touches' a view.
Fixed by adding
android:windowSoftInputMode="adjustPan"
to AndroidManifest.xml under <activity</>
Answer found here
When I designed my App UI , it looks good on the emulator, but when I run the app on a real device (which has a smaller screen), it looks so bad with some widgets stacked over each other, why? And what the solution?
<LinearLayout
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="musabnasr.com.weeklyaccomplished.MainActivity"
android:background="#ffffff"
android:orientation="vertical"
android:weightSum="1"
>
<ImageView
android:layout_width="195dp"
android:layout_height="110dp"
android:id="#+id/imageView"
android:src="#drawable/userlogin"
android:scaleType="centerCrop"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:ems="10"
android:id="#+id/usernamefield"
style="#android:style/Widget.Holo.EditText"
android:hint="user name:"
android:layout_below="#+id/imageView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="26sp"
android:layout_alignParentEnd="true"
android:layout_gravity="center_horizontal"
/>
<EditText
style="#android:style/Widget.Holo.EditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:ems="10"
android:id="#+id/passwordfield"
android:hint="password :"
android:layout_below="#+id/usernamefield"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="91sp"
android:layout_alignParentEnd="true"
android:layout_gravity="center_horizontal"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Log in or Sign Up"
android:id="#+id/login_signup"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="150sp"/>
I have the following xml layout but my scrollview is not scrolling when I run the app. What am I doing wrong? I am trying to use a Relative layout in the scrollview instead of a Linear Layout Here is the xml..
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Medium Text"
android:id="#+id/main_title"
android:textSize="30sp"
android:textStyle="bold"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ImageView
android:layout_width="180dp"
android:layout_height="270dp"
android:id="#+id/movie_poster"
android:layout_weight="0.59"
android:layout_below="#+id/main_title"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="30dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Ratings:"
android:id="#+id/textView"
android:layout_alignTop="#+id/movie_poster"
android:layout_toRightOf="#+id/movie_poster"
android:layout_toEndOf="#+id/movie_poster"
android:layout_marginLeft="52dp"
android:layout_marginStart="52dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=" 6.5"
android:textStyle="bold"
android:id="#+id/movie_rating"
android:layout_alignTop="#+id/textView"
android:layout_toRightOf="#+id/textView"
android:layout_toEndOf="#+id/textView" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=" 2015-01-01"
android:textStyle="bold"
android:id="#+id/movie_release_date"
android:layout_below="#+id/textView"
android:layout_alignLeft="#+id/textView" />
<TextView
android:layout_width="wrap_content"
android:layout_height="180dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Medium Text"
android:id="#+id/movie_description"
android:layout_below="#+id/movie_poster"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</ScrollView>
That is because you set the height of the ScrollView to fill_parent.
Try using a LinearLayout with weight so it fills the space left over from the other views.
If you do not want to set it to a specific height, you can also add
android:fillViewport="true"
to your ScrollView
I've tried everything I can think of but can't get this layout working. It's a ListView that list matches in a row.
Row one is first match, and next row is second match, and so on. I don't don't mind the green strokes and borders.
Is it even possible?
See the deisgn here:
Here's an example implementation, it does however use negative margins, to overlap the thing I called badge.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#cdcdcd"
android:gravity="center_vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="#+id/score"
android:layout_below="#+id/badge"
android:background="#color/white"
android:orientation="vertical"
android:padding="16dp"
android:showDividers="middle">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView 1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView 2"/>
</LinearLayout>
<TextView
android:id="#+id/score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:padding="16dp"
android:text="0 vs 7"
android:layout_below="#+id/badge"
android:textSize="32sp"
android:textStyle="bold"/>
<LinearLayout
android:layout_below="#+id/badge"
android:id="#+id/right_table"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/score"
android:background="#color/white"
android:orientation="vertical"
android:padding="16dp"
android:showDividers="middle">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView 1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView 2"/>
</LinearLayout>
<TextView
android:id="#+id/badge"
android:layout_toRightOf="#id/score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0f0"
android:layout_marginLeft="-12dp"
android:layout_marginBottom="-8dp"
android:text="Badge"
/>
</RelativeLayout>
To alternate the background simply set the background in getView in your adapter.
You'll need a custom adapter that fills the ListView (better use RecyclerView & an Adapter with ViehHolder), this row layout is taken from my own project, not exactly what you requested, but you'll get the idea. Just comment for further information.
<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="wrap_content"
>
<TextView
android:id="#+id/textV_player1"
android:text="player1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="40dp"
android:layout_marginEnd="40dp"
android:textSize="20sp"
android:paddingTop="15dp"
android:gravity="end"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#+id/textV_vs"
android:layout_toStartOf="#+id/textV_vs" />
<TextView
android:id="#+id/textV_player2"
android:text="player2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:paddingTop="15dp"
android:layout_alignBottom="#+id/textV_vs"
android:layout_toRightOf="#+id/textV_vs"
android:layout_toEndOf="#+id/textV_vs" />
<TextView
android:id="#+id/textV_vs"
android:text="vs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="40dp"
android:layout_marginEnd="40dp"
android:textSize="20sp"
android:layout_above="#+id/textV_points1"
android:layout_centerHorizontal="true" />
<TextView
android:id="#+id/textV_points1"
android:text="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:paddingTop="3dp"
android:paddingBottom="15dp"
android:layout_below="#+id/textV_player1"
android:layout_alignRight="#+id/textV_player1"
android:layout_alignEnd="#+id/textV_player1" />
<TextView
android:id="#+id/textV_points2"
android:text="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:paddingTop="3dp"
android:paddingBottom="15dp"
android:layout_below="#+id/textV_player2"
android:layout_alignLeft="#+id/textV_player2"
android:layout_alignStart="#+id/textV_player2" />
<TextView
android:id="#+id/textV_vspoints"
android:text=":"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:paddingBottom="15dp"
android:layout_below="#id/textV_vs"
android:layout_centerHorizontal="true" />
</RelativeLayout>
I want to change text of Textview dynamically,
but it does not show full text.instead it shw one or two character less than it or sometimes show "...." atlast.
This is a layout for an custom equalizer.
This is my xml file.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="#+id/fullscreenlnearlayout"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="0.38"
android:gravity="center" >
<Button
android:id="#+id/btnformenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:text="Create New..." />
<ImageButton
android:id="#+id/refresh"
android:contentDescription="Reset Equalizer to Default"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_margin="20dp"
android:adjustViewBounds="false"
android:alpha=".4"
android:src="#drawable/refresh"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ToggleButton
android:id="#+id/exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignTop="#+id/refresh"
android:layout_marginRight="15dp"
android:layout_marginEnd="15dp"
android:alpha=".4" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:id="#+id/horizontalscrollforequaliser"
android:layout_height="0dp"
android:isScrollContainer="false"
android:layout_weight="1">
<TextView
android:id="#+id/seekbar1kabottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="60Hz" />
<include
android:id="#+id/include5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/seekbar1kabottom"
android:layout_alignTop="#+id/include7"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_centerHorizontal="true"
layout="#layout/eq_bar" />
<TextView
android:id="#+id/seekbar3katop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:singleLine="true"
android:text="0mB" />
<TextView
android:id="#+id/seekbar3kabottom"
android:singleLine="true"
android:layout_width="wrap_content"
android:layout_centerInParent="true"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="910Hz" />
<include
android:id="#+id/include7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/seekbar3kabottom"
android:layout_alignParentLeft="true"
android:layout_below="#+id/seekbar3katop"
layout="#layout/eq_bar" />
<include
android:id="#+id/include"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/seekbar5kabottom"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/include4"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginStart="10dp"
layout="#layout/eq_bar" />
<include
android:id="#+id/include4"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/include5"
android:layout_alignTop="#+id/include6"
android:layout_toStartOf="#+id/include"
android:layout_toLeftOf="#+id/include"
layout="#layout/eq_bar" />
<TextView
android:id="#+id/seekbar4katop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/include4"
android:layout_alignStart="#+id/include4"
android:layout_alignEnd="#+id/seekbar4kabottom"
android:layout_alignLeft="#+id/include4"
android:layout_alignRight="#+id/seekbar4kabottom"
android:singleLine="false"
android:text="0mB"/>
<TextView
android:id="#+id/seekbar5kabottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:singleLine="true"
android:layout_below="#+id/include4"
android:text="14KHz" />
<TextView
android:id="#+id/seekbar4kabottom"
android:singleLine="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/include4"
android:layout_alignLeft="#+id/include4"
android:layout_below="#+id/include4"
android:text="3600Hz" />
<TextView
android:id="#+id/seekbar2kabottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/include6"
android:layout_alignParentBottom="true"
android:singleLine="true"
android:text="230Hz" />
<TextView
android:id="#+id/seekbar2katop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/include6"
android:layout_alignEnd="#+id/seekbar2kabottom"
android:layout_alignLeft="#+id/include6"
android:layout_alignParentTop="true"
android:layout_alignRight="#+id/seekbar2kabottom"
android:singleLine="false"
android:text="0mB" />
<include
android:id="#+id/include6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/include7"
android:layout_below="#+id/seekbar1katop"
android:layout_marginStart="15dp"
android:layout_marginLeft="15dp"
android:layout_toRightOf="#+id/include7"
layout="#layout/eq_bar" />
<TextView
android:id="#+id/seekbar5katop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/include"
android:layout_alignLeft="#+id/seekbar5kabottom"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_alignStart="#+id/include"
android:singleLine="false"
android:text="0mB" />
<TextView
android:id="#+id/seekbar1katop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/include7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/include7"
android:singleLine="false"
android:text="0mB" />
</RelativeLayout>
</LinearLayout>
In picture you can see text s not coming u fully....it is not showing mB (unit) atlast.
I am trying this from several hours,but unable to do this
Please give me a way to achieve this .
Thans in advance :)
You can decrease the text size of the TextView and see the changes. Ideally Android design guidelines specify that you create separate layouts for different screen sizes and resolutions. So on some devices the TextView font size would just fit fine but for others it'd have to be adjusted
You can decrease Text size of the TextView .
If you want remove .... You can remove this line
android:singleLine="true"
and set width as match_parent or fill_parent .
Remove wrap content and set a size using dp, it will probably work