0

. I am doing reverse-engineering of applications.While reverse-engineering an app i needed to change the titles of each activities in an app that i got .I have a problem regarding activity titlebar. Actually the developers of this app have set many of the titles from androidManifest.xml file using

<activity  android:name="com.example.dmo.MainActivity"  android:label="first"></Activity>

I changed the title of each activity by putting setTitle(" say abc"); in onCreate() of each activity and title is successfully changed, But problem is that while loading activity it shows the titlebar with the title from androidManifest.xml file i.e. android:label="first". This title appears for some miliseconds (time increases if activity takes more tome to load), and then when my activity loads completely, title changes to the text i passed in setTitle() in onCreate(). This is somewhat similar to my problem.

I am not able to find solution since i have a strict restrictions that i can not make changes in any of the .xml fiels in an applicaion. I only allowed to change the java code and add some new java code if necessary.

I searched a lot but all solutions i found suggested changes in xml files; and some other solutions those suggested using code did not worked.

 So is there any solution that does not require manual hard code  xml changes directly. Changing xml using code is acceptable but not hard code changes like editing their original manifest file to :`<activity  android:name="com.example.dmo.MainActivity"  android:label="say abc"></Activity>`

Any AspectJ solution is also acceptable(i.e. some pointcut to some method that can do the work for me), if someone knows for the same.

I also want to know that, which class or api is responsible to load title bar before activity loads? ,so that if possible i can make changes in that .

Any help would be very appreciable . .Thank u in advance . .

Community
  • 1
  • 1
Anonymous
  • 1,726
  • 4
  • 22
  • 47
  • That's a known problem http://stackoverflow.com/questions/23184333/how-to-set-the-theme-for-the-application-to-avoid-wrong-color-transitions http://stackoverflow.com/questions/21914482/fastest-way-to-change-theme-during-app-startup http://stackoverflow.com/questions/23469730/how-to-remove-the-activity-title-from-action-bar-sherlock-without-losing-it-from/23470237 – Yaroslav Mytkalyk May 08 '14 at 07:39
  • @Doctoror Drive i mentioned in question that i am not allowed to change xml files , and all these questions suggests changes in an xml.So this is not working for me . . .Thanx for suggestion . . – Anonymous May 08 '14 at 09:16

1 Answers1

0

Then the answer is you can't. This is the Application theme that is shown and it can be changed only in manifest. The screen you see is the Activity screen in state when the Application is not yet loaded and before any code in Activity onCrete() is executed.

Did you try apktool? You should be able to get editable manifest using it.

Yaroslav Mytkalyk
  • 16,950
  • 10
  • 72
  • 99