<?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.ravi.designdemo.main4activity"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/navigationbar" android:id="@id/ll1"> <imagebutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imb1" android:background="@drawable/back" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/tv1" android:text="sign in" android:textcolor="#ffffff" android:gravity="center_vertical" android:textsize="25dp" android:textstyle="bold"/> </linearlayout> </relativelayout>
this layout. have imageview on left side , textview on center inside linearlayout. using linearlayout inside relativelayout.
android:layout_gravity="center_vertical" add textview.
Comments
Post a Comment