android-layout

Android: remove shadow from bottom navigation

半城伤御伤魂 提交于 2020-03-01 01:42:34
问题 When placing a container below my bottom navigation, it is partly covered by the gray shadow from the navigation, even after adding content to the container. How do I remove the shadow? 回答1: Use app:elevation="0dp" to hide shadow from from bottom navigation <android.support.design.widget.BottomNavigationView android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="@android:color

How to fix ' You must specifiy a layout in the include tag: <include layout=“@layout/layoutID” />'

陌路散爱 提交于 2020-02-29 19:09:51
问题 I am creating an android application using material design in android studio for pre lollipop devices and i am new to android studio i am creating a tool bar in my project but i am getting an error called " Caused by: android.view.InflateException: You must specifiy a layout in the include tag: " please help me to solve this, This is my activity code: package sample.lakshman.com.sampleltester; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu;

How to fix ' You must specifiy a layout in the include tag: <include layout=“@layout/layoutID” />'

时光怂恿深爱的人放手 提交于 2020-02-29 19:09:21
问题 I am creating an android application using material design in android studio for pre lollipop devices and i am new to android studio i am creating a tool bar in my project but i am getting an error called " Caused by: android.view.InflateException: You must specifiy a layout in the include tag: " please help me to solve this, This is my activity code: package sample.lakshman.com.sampleltester; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu;

Shift recyclerview focus to last element in the list

China☆狼群 提交于 2020-02-27 04:15:06
问题 I am using recyclerview to display messages in a chat window. However, when a new message is being edited, the recycler view focus should be on the last element. I expect there would be some way to shift the focus of a recyclerview to last element instead of first. 回答1: use recyclerView.smoothScrollToPosition(position); position is your index of last item inserted. This will move your the RecyclerView focus on the last element. 回答2: Use can add any of the two lines on your LinearLayoutManager

Android: How to make the views the same height dynamically

爱⌒轻易说出口 提交于 2020-02-25 23:28:12
问题 I'm making one table in Android application. Now I cannot make the views the same height. There are 2 TextView s, tmp_name and tmp_content in each row. the height of tmp_content depends on the length of course_description(i) . tmp_content sets its height automatically. I'd like to get the height of tmp_content and reset the height of tmp_name same with tmp_content . If you have any tips, please let me know. for (int i = 0; i < course_name.size(); i++) { TableRow.LayoutParams lp = new TableRow

Android - wizard type activity with adapter backed data

有些话、适合烂在心里 提交于 2020-02-25 05:20:35
问题 Im trying to work out the best way to approach the following problem with Android. I have data coming from a content provider in the form of an array of Question objects. A Question object has some text and an id. Each question has 4 answers, which will be sent back to the rest server in a QuestionResponse object. Id like the questions to be displayed one at a time in a view (user reads question, selects answer, and then hits "next", which moves to the next question on a new screen) but I

How to remove those dark circular background from floating action button?

[亡魂溺海] 提交于 2020-02-25 04:15:08
问题 I am not able to remove those dark circle background from floating action button. By default it has a circle button with above circular shade. but some how couldnt find a way to remove that shade. 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:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android

Simple yet tricky layout using ConstraintLayout

本秂侑毒 提交于 2020-02-24 17:25:57
问题 I am trying to make the following seemingly simple yet tricky layout using ConstraintLayout . Normal UI: With longer title: I have tried following code: <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:text="April Ludgate" android

Simple yet tricky layout using ConstraintLayout

廉价感情. 提交于 2020-02-24 17:18:45
问题 I am trying to make the following seemingly simple yet tricky layout using ConstraintLayout . Normal UI: With longer title: I have tried following code: <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:text="April Ludgate" android

Simple yet tricky layout using ConstraintLayout

泪湿孤枕 提交于 2020-02-24 17:14:13
问题 I am trying to make the following seemingly simple yet tricky layout using ConstraintLayout . Normal UI: With longer title: I have tried following code: <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="1" android:text="April Ludgate" android