Tuesday, 22 August 2017

Create Custom Toolbar

step1


<style name="noaction" parent="Theme.AppCompat.DayNight.NoActionBar"></style>

step2
  <android.support.v7.widget.Toolbar      
          android:id="@+id/toolbar_top"        
          android:layout_height="wrap_content"      
          android:layout_width="match_parent"        
          android:minHeight="?attr/actionBarSize"      
          android:background="@color/colorBlue"        
          app:theme="@style/noaction"      
          android:weightSum="1">
<ImageView    
          android:layout_width="47dp"  
          android:background="@drawable/tittle"   
          android:layout_height="42dp" />

 <TextView            
          android:layout_width="wrap_content"           
          android:layout_height="wrap_content"          
          android:text="My Toolbar"          
          android:textSize="24dp"          
          android:layout_marginLeft="40dp"            
          android:textColor="@android:color/white"          
          android:layout_gravity="center"           
          android:id="@+id/toolbar_title" /></android.support.v7.widget.Toolbar>

No comments:

Post a Comment

HOW TO CREATE CIRCLE IMAGE VIEW

Step 1: implementation 'de.hdodenhof:circleimageview:3.0.0' Step 2: <de.hdodenhof.circleimageview.CircleImageView xmlns:ap...