Hello! I will explain the essence of the issue.When I open my application on the phone, there is its name at the top.So I need to make sure that this name is in the center, and not along the left edge.Newbie, Google does not help(
  • Reading a textbook or official documentation would help. – Ancient Workout Apr 14 '19 at 20:36

2 Answers 2

                android: id="@ + id/toolbar"
                android: layout_width="match_parent"
                android: layout_height="? attr/actionBarSize"
                android: background="@ color/colorPrimary">

                    android: layout_width="wrap_content"
                    android: layout_height="wrap_content"
                    android: text="Title"
                    android: layout_gravity="center"
                    android: id="@ + id/toolbar_title"//gt;

  • And what file is it to insert? – Elegant Eland Apr 14 '19 at 20:40
  • [[eeennyg]], in mock activity/fragment – Sore6 Apr 14 '19 at 20:44