how to remove label from application

coco bar

i made my first app today using an application named "A.I.D.E". i am an android user and its my first time making an app, how can i remove my app name and lable from the top of the main screen? i named my app "YT Studio" but i dont want to show this name and lable on top of my main screen, i want it to be blank, can someone help me? i gave you my android manifest.xml and main.java file for the reference, i would love to edit my question for more help in future.

an image showing app lable and text

android manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ojhastudios.ytstudio" >

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="YT Studio"
        android:theme="@style/AppTheme"
        android:resizeableActivity = "true">
        <activity
            android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

main.xml

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:text="@string/hello_world"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="30dp" />

</LinearLayout>

edit: one fellow asked me for code, there you go

package com.mycompany.myapp;

import android.app.*;
import android.os.*;

public class MainActivity extends Activity 
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        getSupportActionBar().hide();
    }
}
Sambhav. K

You can just call

getSupportActionBar().hide();

in your activity's onCreate() method.

Edit


The method given above does not work when using AndroidX activity. It works with AppCompatActivity.

So, this answer will do the task.

In your AndroidManifest.xml, find your activity and then you should add this line in it:

<application>
   ...
   <activity
      android:name=".MainActivity"
      android:theme="@style/Theme.MaterialComponents.Light.NoActionBar">
         ...
   </activity>
   ...
</application>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Chartjs: how to remove datapoint info from label?

How to remove a Warning label from Tkinter GUI

How to remove a prebuilt entity label from an utterance

how to remove a specific string from a label

How remove label from seaborn left axis?

How to remove Label from charts.js

How to remove the label from geom_label_repel() in the third facet?

Remove label from the clone?

Remove indent from label

How to remove, randomly, rows from a dataframe but from each label?

how to remove SELinux label?

How to remove a Label in UserForm?

How to remove string from ArrayList after show it in a label?

Kubernetes API: How to add/remove label from Node

How can i remove default space occupied by label from group?

How to remove one bar label from the legend in a multiple bar chart

How can I remove all label layers from cell

How do I remove gesture recogniser from a label in a UITableViewCell?

How do I entirely remove the label from a CheckBox?

How to remove label from group tag in Odoo 11 in views

how to remove underline from link label in compact framework (windows ce)

How do you remove the cell label from your table?

How to remove one of scrolling label from Frame on mouse click at runtime?

How can I remove the default text from label helpers in rails?

How to remove class from label checkbox on click using jQuery

How do I remove a database from an application?

How to remove Scene Delegate from iOS Application?

How to remove SeDebugPrivilege privilege from .NET application

Remove label from input field