I need to get my title bar to be orange instead of the standard gray and I can't figure out how to edit it's settings. I also need to align the text so its on the right side of the title bar instead of the left. Any ideas on how to do this?
How do you edit title bar?
5.6k Views Asked by Connor At
2
There are 2 best solutions below
0
HjK
On
To give the title bar your desired color(orange), use the following code in your oncreate,
this.setTitleColor(#FF6600);
or create a custom title bar and use it throughout the application. U can do all kinds of modifications if you create your custom title bar.
eg.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="400px"
android:layout_height="fill_parent"
android:orientation="horizontal">
<ImageView android:id="@+id/ImageView01"
android:layout_width="57px"
android:layout_height="wrap_content"
android:background="@drawable/icon1">
</ImageView>
<TextView
android:id="@+id/myTitle"
android:text="This is my new title"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="@color/titletextcolor"
/>
</LinearLayout>
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in TEXT
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- How to increase quality of mathjax output?
- How to appropriately handle newlines and the escaping of them?
- How to store data with lots of subdata but keep easy and simple access in python
- Can I make this kind of radio button?
- I am findind it dificult to create a box containing text
- Replacing Text using Javascript
- How to set text inside a div using JavaScript and CSS
- How to get new text input after entering a password in a tab?
- How can I get my hero section to look like this?
- Find text and numbers Formatted: "Case: BE########" and format them, regardless of the number
- Auto style text in flutter
- Text analytics and Insights
- Combine an audio and a text file as one single file
- How to align side text and table horizontally in R-markdown
Related Questions in ALIGNMENT
- How can I get my hero section to look like this?
- How to align two elements in different views with leading edge in SwiftUI?
- Why isn't the arrow for the romance span aligned with the words, like all the others in the navbar and how do I fix it (Entire code isn't mine)
- How to align legend elements in the middle when they are on two rows using ggplot2?
- How to make a ScrollView align to left side of frame?
- Flutter TextField Hint or Text Not Align CenterLeft while set the Container height 40
- CSS: Display block, first item is not aligned correctly
- Kotlin - removes spaces around buttons
- C# AutoCAD Civil3D 2022 Activex get civil object properties
- newbie Flexbox Responsiveness alignment issues
- CSS - Display:block getting put by default
- How to align controls in Excel Addin
- Incorrect icon alignment with canvaskit renderer web even after using no icon tree shaking
- How Can I float a log in and sign up link or button to the right of the page?
- Textarea & Signature Pads - Out of place
Related Questions in TITLEBAR
- Is sending the message WM_GETTITLEBARINFOEX to get the caption bar RECT stable? or it has a regression?
- Customize the background color and text color of a customTkinter window title bar
- Why doesn't this c# function properly hide the titlebar?
- Electron titlebar interferes with mouse events
- Remove titlebar without using overrideredirect() using Tkinter on Windows
- How can I change the background color of the title bar in an android emulator in VS 2022
- WinForm MdiControl Child Titlebar Styling
- How can we change page title after we get the data from server and want to load in client side or server side component?
- Flutter window, multi window and remove title bar
- How to change Titlebar visibility on tkinter?
- How to know if the mouse clicked once on a window's title bar?
- Windows titlebar icon only shows top half of icon
- watchOS 10 Beta - WKInterfaceController title alignment
- In Electron, how to preserve the original traffic light buttons?
- How to determine whether a window has an embedded title bar?
Related Questions in ANDROID-TITLEBAR
- Why back button on title bar isn't shown
- Changing the android titlebars which shows network bars, battery life and other things
- Android Studio app crashes when removing title bar
- How to adjust transparancy of Android title bar?
- How to set toolbar title from fragment using Navigation UI Component
- Android Hide or Show Title Bar from the Activity and Fragment
- Set text color to top bar right buttons in overflow menu using react-native-navigation
- Android: setTitle inside RecyclerView addOnItemTouchListener is not working
- Android: how to hide title bar on button click
- Activity.setTitle doesn't work in runOnUiThread block
- How can i change this code to use it in the activity?
- How to change title's position in toolbar?
- How to keep options menu open in titlebar?
- How to set the current date as the title in the title bar?
- how to design navigation drawer & title bar?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Android: Custom Title Bar