With out the use of appcompat_v7 support library we are adding these lib with our project. If you want to Remove simply follow these steps:
1.Firstly in project,Right click->properties->Android.There you can see the red marked appcompat placed in Reference. Click that and Remove it.
2.Edit and change your activity_main.xml like these:
3.In res/values/styles.xml:
4.In res/values-v11/styles.xml
5.In res/values-v14/styles.xml
6.Change your menu/main.xml
7.Finally change your MainActivity.java
1.Firstly in project,Right click->properties->Android.There you can see the red marked appcompat placed in Reference. Click that and Remove it.
<?xml version="1.0" encoding="utf-8"?> <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"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> </RelativeLayout>
<resources> <style name="AppBaseTheme" parent="android:style/Theme.Light"> </style> <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> </style> </resources>
4.In res/values-v11/styles.xml
<resources> <style name="AppBaseTheme" parent="@android:style/Theme.Light"> </style> </resources>
5.In res/values-v14/styles.xml
<resources>
<style name="AppBaseTheme" parent="@android:style/Theme.Light"> </style>
</resources>
6.Change your menu/main.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_settings"/> </menu>
7.Finally change your MainActivity.java
import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }



No comments:
Post a Comment