0

My requirement is as follows:

I have two modes of my application in first mode it will open normally but in second mode I have to re size all the screens to a fixed dimension. I am able to do so by writing code in each activity before calling setContentView() method, what I want to know is, Does there any optimal way of doing the same i.e writing the code at single place or anything else so that I can optimize the code.

I am looking for it because in second mode I will set some parameters, And my application then required to check the parameter in activities individually which in terms effect my performance, that's why I want something which runs at starting of my app and re size all the activities view.

any help would be greatly appreciated!!

Edit:

Can we specify the dimensions in the attrs.xml and dynamically set the specified theme?

Cœur
  • 37,241
  • 25
  • 195
  • 267
skygeek
  • 1,548
  • 11
  • 24

1 Answers1

1

Have you tried using Fragments? http://developer.android.com/guide/components/fragments.html

Emmanuel
  • 13,083
  • 4
  • 39
  • 53
  • The Shakespeare app example they have [here](http://developer.android.com/guide/components/fragments.html#Example) is very nice too! – verybadalloc Jun 24 '13 at 14:13
  • No, as I am looking for Activities only. I am able to re size them individually but not in a bunch! – skygeek Jun 24 '13 at 14:14