My Portrait View is looks Fine
My Landscape View alignment is collapsed
this is my code of activity_main.xml
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:id="#+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
<LinearLayout
android:id="#+id/linear_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="#+id/img_slideshow_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:id="#+id/img_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/indicator"
android:background="#color/PrimaryColor"
android:gravity="center"
android:ellipsize="end"
android:paddingBottom="2dp"
android:paddingLeft="5dp"
android:paddingRight="2dp"
android:paddingTop="2dp"
android:singleLine="true"
android:textColor="#ededed" />
</RelativeLayout>
<View android:id="#+id/div_a"
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_below="#+id/img_slideshow_layout"
android:background="#color/view_divider_color" />
<View android:id="#+id/div_b"
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_below="#+id/div_a"
android:background="#color/view_divider_color_2" />
<com.studiobluelime.utils.CirclePageIndicator
android:id="#+id/indicator"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/view_pager"
android:layout_marginBottom="4dp" />
</RelativeLayout>
<!--<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
style="#style/Base.Widget.AppCompat.ProgressBar"
android:id="#+id/progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:indeterminate="true" />
<android.support.v7.widget.RecyclerView
android:id="#+id/card_recycler_view"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>-->
<!-- <android.support.v7.widget.RecyclerView
android:id="#+id/card_recycler_view_new"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"/>-->
</LinearLayout>
</ScrollView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="100dp"
app:srcCompat="#drawable/shop_online"
android:layout_marginLeft="140dp"
android:id="#+id/shop_online"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:layout_marginTop="200dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="#drawable/nandme"
android:adjustViewBounds="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="320dp"
android:scaleType="fitXY"
android:id="#+id/nandme"/>
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
app:srcCompat="#drawable/storelocation"
android:adjustViewBounds="true"
android:layout_marginLeft="258dp"
android:id="#+id/storelocation"
android:scaleType="fitXY"
android:layout_marginTop="250dp"/>
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
app:srcCompat="#drawable/promotins"
android:adjustViewBounds="true"
android:layout_marginLeft="20dp"
android:id="#+id/promotins"
android:scaleType="fitXY"
android:layout_marginTop="240dp"/>
<android.support.v4.view.ViewPager
android:id="#+id/view_pager"
android:layout_width="fill_parent"
android:layout_height="157dp" />
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="#+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:itemIconTint="#color/PrimaryDarkColor"
app:itemTextColor="#color/colorAccent"
app:itemBackground="#drawable/ripple"
app:menu="#menu/navigation_items" />
</android.support.v4.widget.DrawerLayout>
I wrote this code in four layouts: layout/activity_main.xml,layout-small/ activity_main.xml, layout-large/activity_main.xml, layout-xlarge/activity_main.xml but it did not change. I have attached a screen shot here. Please click the above name "My Portrait View is looks Fine My Landscape View alignment is collapsed"
Related
This my code in this I have been using scrollView and inside it two textViews to add more content but it is working only when there is one textView please what changes i do to add more content?And here I want space between those textViews(content) but in my code i am trying for that but the content is overlapped and there is no proper space between contents.please help me..!
<?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"
tools:context="com.example.hp.kludge.AndroidActivity">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:weightSum="1">
<TextView
android:id="#+id/tvA"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text="ANDROID"
android:textColor="#f6080101"
android:textColorHighlight="#df1425"
android:textSize="35dp"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:background="#e62027"
android:layout_height="2dp"
android:layout_below="#+id/tvC" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/scrollView"
android:fillViewport="true"
android:orientation="vertical">
<TextView
android:id="#+id/tvWhat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/tvC"
android:layout_marginTop="44dp"
android:text="What is Android?"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="22dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Content"
android:id="#+id/tvt" />
</ScrollView>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
android:id="#+id/butNext"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:background="#abc3fb" />
</RelativeLayout>
my image wont center using the code "android:layout_centerHorizontal" even using gravity wont solve it. Is there any other way or are there wrong inputs in my relativelayout and scroll view.
scale layout bounds
landscape view of with scale layout bounds
screen size 768x1280 nexus api23
I am not having problems with android version 4 maybe this is api related? since my minimum sdk is android version 2?
Here is the code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:fillViewport="true"
android:layout_height="fill_parent">
<RelativeLayout
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_vertical_margin"
tools:context="com.capstone.jmilibraryapp.Login">
<EditText
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="#+id/etUsername"
android:hint="Enter Sr-Code"
android:layout_below="#+id/imageView3"
android:layout_centerHorizontal="true" />
<ImageView
android:layout_centerHorizontal="true"
android:layout_width="500dp"
android:layout_height="200dp"
android:src="#drawable/jmilogo"
android:id="#+id/imageView3"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="#+id/etPassword"
android:inputType="textPassword"
android:hint="Password"
android:layout_below="#+id/etUsername"
android:layout_centerHorizontal="true" />
<Button
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="#+id/bLogin"
android:text="Log In"
android:layout_below="#+id/etPassword"
android:layout_alignLeft="#+id/etPassword"
android:layout_alignStart="#+id/etPassword" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Log In as Guest"
android:id="#+id/guest"
android:layout_marginTop="20dp"
android:layout_below="#+id/bLogin"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Log In as Guest"
android:id="#+id/testinguser"
android:layout_marginTop="20dp"
android:layout_below="#+id/guest"
android:layout_centerHorizontal="true"
/>
</RelativeLayout>
</ScrollView>
Probably your image donĀ“t have the same ratio of your ImageView, you can check it enabling showLayoutBounds in the developer tools in the device. You will see the real size of the imageView.
To solve that you can make you ImageView to be proportionally to your ImageView or ad a scaleType="fitCenter" to your ImageView.
Try below xml this is work with me..
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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:layout_centerHorizontal="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="20dp"
android:orientation="vertical">
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android:scaleType="fitCenter"
android:src="#drawable/school" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_weight="1">
<EditText
android:id="#+id/etUsername"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:hint="Enter Sr-Code" />
<EditText
android:id="#+id/etPassword"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_below="#+id/etUsername"
android:layout_centerHorizontal="true"
android:hint="Password"
android:inputType="textPassword" />
<Button
android:id="#+id/bLogin"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/etPassword"
android:layout_alignStart="#+id/etPassword"
android:layout_below="#+id/etPassword"
android:text="Log In" />
<TextView
android:id="#+id/guest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/bLogin"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Log In as Guest"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<TextView
android:id="#+id/testinguser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/guest"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Log In as Guest"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
My Toolbar shows when loading, but then my mapfragment covers it and it is no longer visible. Here is my layout:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<android.support.v7.widget.Toolbar
android:id="#+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"/>
<fragment
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.maps.MapFragment"/>
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="#color/white_80_opacity">
<ImageView
android:id="#+id/play_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_play_icon"
android:adjustViewBounds="true"
android:maxHeight="50dp" />
<ImageView
android:id="#+id/reduce_screen_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_fullscreen_exit_48dp"
android:adjustViewBounds="true"
android:maxHeight="50dp"
android:layout_gravity="right"
android:paddingRight="8dp" />
</android.support.v7.widget.Toolbar>
</RelativeLayout>
<ImageView
android:id="#+id/adview"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#708090" />
In code I set the first toolbar:
Toolbar toolbar = (Toolbar) findViewById(R.id.top_bar);
toolbar.setTitle("State College");
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
Any ideas?
I needed to move my Toolbar to the bottom of the layout file. I assume it is like a z-index factor. Here is my updated file.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<fragment
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.maps.MapFragment"/>
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="#color/white_80_opacity">
<ImageView
android:id="#+id/play_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_play_icon"
android:adjustViewBounds="true"
android:maxHeight="50dp" />
<ImageView
android:id="#+id/reduce_screen_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_fullscreen_exit_48dp"
android:adjustViewBounds="true"
android:maxHeight="50dp"
android:layout_gravity="right"
android:paddingRight="8dp" />
</android.support.v7.widget.Toolbar>
<android.support.v7.widget.Toolbar
android:id="#+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"/>
</RelativeLayout>
<ImageView
android:id="#+id/adview"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#708090" />
Hi guys i have this layout...but if my phone is horizontal doesn't work the ScrollView
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="#+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/sfondomain" >
<ImageView
android:id="#+id/imageView0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:src="#drawable/icon_drawer" />
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_below="#+id/imageView0"
android:src="#drawable/homelogo" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="167dp"
android:textColor="#FFFFFF"
android:textStyle="bold|italic"
android:text="Prossimo Arrivo"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ListView
android:id="#+id/arrivi"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_below="#+id/tv1"
android:cacheColorHint="#00000000" />
<TextView
android:id="#+id/tv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="327dp"
android:textColor="#FFFFFF"
android:textStyle="bold|italic"
android:text="Prossima Partenza"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ListView
android:id="#+id/partenze"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_below="#+id/tv2"
android:cacheColorHint="#00000000" />
<ImageView
android:id="#+id/info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp"
android:src="#drawable/info" />
</RelativeLayout>
</FrameLayout>
<ListView
android:id="#+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="#android:color/transparent"
android:dividerHeight="0dp"
android:background="#drawable/background" >
</ListView>
but i don't know how put a ScrollView.
The layout works fine but when my phone in landscape doesn't scroll
I tried this:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="#+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/sfondomain" >
<ImageView
android:id="#+id/imageView0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:src="#drawable/icon_drawer" />
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_below="#+id/imageView0"
android:src="#drawable/homelogo" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="167dp"
android:textColor="#FFFFFF"
android:textStyle="bold|italic"
android:text="Prossimo Arrivo"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ListView
android:id="#+id/arrivi"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_below="#+id/tv1"
android:cacheColorHint="#00000000" />
<TextView
android:id="#+id/tv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="327dp"
android:textColor="#FFFFFF"
android:textStyle="bold|italic"
android:text="Prossima Partenza"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ListView
android:id="#+id/partenze"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_below="#+id/tv2"
android:cacheColorHint="#00000000" />
<ImageView
android:id="#+id/info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp"
android:src="#drawable/info" />
</RelativeLayout>
</FrameLayout>
<ListView
android:id="#+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="#android:color/transparent"
android:dividerHeight="0dp"
android:background="#drawable/background" >
</ListView>
</android.support.v4.widget.DrawerLayout>
</ScrollView>
This is a logcat http://paste.ubuntu.com/9697890/
Greetings to all. What time I struggle with the problem. By clicking
on the EditText my keyboard covers half EditText. Tried to put in
Manifest adjustSpan - keyboard covers half EditTekst and adjustResize
- displays the top panel also RelativeLayout. Help solve the problem.
main activity layout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/layout_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/color_background_1">
<android.support.v4.widget.DrawerLayout
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/linear_bottom_panel" >
<FrameLayout
android:id="#+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#5c4768" >
</FrameLayout>
<ListView
android:id="#+id/right_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="#android:color/darker_gray"
android:dividerHeight="0.1dp"/>
<ListView
android:id="#+id/new_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:choiceMode="singleChoice"
android:divider="#android:color/darker_gray"
android:background="#5c4768"
android:dividerHeight="0.1dp"/>
</android.support.v4.widget.DrawerLayout>
<LinearLayout
android:id="#+id/linear_bottom_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#color/color_bottom_panel"
android:orientation="horizontal" >
<ImageView
android:id="#+id/image_main_news"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="#drawable/ic_main_news_selector" />
<ImageView
android:id="#+id/image_main_chat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="#drawable/ic_main_chat_selector" />
<ImageView
android:id="#+id/image_main_add_mp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="#drawable/ic_main_add_mp_selector" />
<ImageView
android:id="#+id/image_main_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:src="#drawable/ic_main_map_selector" />
<ImageView
android:id="#+id/image_main_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="#drawable/ic_main_user_selector" />
</LinearLayout>
<ProgressBar
android:id="#+id/progress_load"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="invisible"
android:indeterminateDrawable="#drawable/load_progress" />
</RelativeLayout>
this fragment layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/color_background_1" >
<include
android:id="#+id/discus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
layout="#layout/layout_discus_view"
/>
<ListView
android:id="#+id/list_chat"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_alignParentLeft="true"
android:layout_below="#+id/discus"
android:layout_above="#+id/add_message"
android:listSelector="#drawable/listview_item_selector"
>
</ListView>
<include
android:id="#+id/add_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
layout="#layout/layout_add_new_message"
/>
</RelativeLayout>
where adjustSpan layout #+id/add_message keyboard overlap