TheMadKoder
TheMadKoder

Reputation: 53

Naming of Activity in android

I am using someone else's code and they have the following code

Intent j = new Intent();
j.setClass(this, ReplaceActivity_.class);

but the class they have is "ReplaceActivity". Is there a reason for the "_" after the ReplaceActivity? I am using intelliJ and it gives me a compiler error.

Upvotes: 0

Views: 88

Answers (2)

NagarjunaReddy
NagarjunaReddy

Reputation: 8645

try like this

Intent i = new Intent (presentActivity.this,ReplaceActivity_.class);
StartActivity(i);

Upvotes: 0

Tyler Treat
Tyler Treat

Reputation: 14988

It's for a framework called AndroidAnnotations. The framework reduces boilerplate code by generating bytecode at compile time. The generated Activities have an underscore appended to their names, which is (presumably) why you see this.

Upvotes: 1

Related Questions