Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to delete an activity andriod

see the source to get your answer faster and easier


I'm answering my own question since I figured out a way to see exactly what got
added after creating a new activity.

Since I was putting everything under Git version control, I realized that I
could do a git diff with a fake activity to see exactly what the changes were.
I discovered that the following files are added whenever a new activity is 
created:


//
FooActivity.java
app/src/main/res/layout/activity_foo.xml
app/src/main/res/menu/foo.xml
//



In AndroidManifest.xml, the following is added:

//code:
<activity
    android:name=".FooActivity"
    android:label="@string/title_activity_foo" >
</activity>
//




In app/src/main/res/values/strings.xml, the following is added:

//code
<string name="title_activity_foo">FooActivity</string>
//


Of course, this wouldn't catch other references that were added after creating
the new activity, so EyesClear's and Shahzad's answers would allow you to find
these references. But in the future, I would probably checkout a new branch
before creating a new activity so that I could nuke any changes that I don't
like.

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #activity #andriod
ADD COMMENT
Topic
Name
6+6 =