0

I want to remove green strip at both ends. Can you help me how to remove the green strip in title bar at both ends.

Here is title bar xml code

<?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="60dp"
   android:orientation="horizontal"
   android:gravity="center"
   android:id="@+id/frontpage_title_bar"
   android:background="@drawable/fronttitle">

<TextView
    android:id="@+id/title_bar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="30sp"
    android:textColor="#ffffff"
    android:text="@string/title" />
</LinearLayout>

java code

public class MainActivity extends AppCompatActivity{
Button bSimple,bTough,bOther,bRate;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //codes to add action Bar

    LinearLayout front_p=(LinearLayout)findViewById(R.id.frontpage_title_bar);
    getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
    getSupportActionBar().setCustomView(R.layout.frontpage_title_bar);

0 Answers0