Click here to Skip to main content
15,896,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using the following, I am unable to show the app name 'My application' when I use 'extends Activity' . At the same time if I use 'extends ActionsBarActivity' the app name is displayed.

C#
import android.app.Activity;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;


public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
Posted
Comments
Richard MacCutchan 29-Jan-15 5:38am    
Show the content of your activity_main module.
S.Rajendran from Coimbatore 29-Jan-15 6:26am    
If I copy and paste the tags are missing for xml files and not complete. I copied this JAva code and pasted and it is OK. Like this for xml files it is not carried out exactly. How to do it to paste here?
Richard MacCutchan 29-Jan-15 7:08am    
Please edit your question and add the details there, so it is readable.
S.Rajendran from Coimbatore 29-Jan-15 6:40am    
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"
="" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
S.Rajendran from Coimbatore 29-Jan-15 6:42am    
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900