0

I am working on android studio and creating a calculator ans I use dp or sp for sizes of buttons. The problem is that, the button size is different on different devices. Please suggest me something

This is how it appears on a Samsung Galaxy S5

This is how it appears on a Galaxy Note Tab

Also I want to disable rotation of the app to only be appeared in portrait view. It should not shift to landscape view.

Enamul Hassan
  • 5,266
  • 23
  • 39
  • 56
Usama Khan
  • 351
  • 1
  • 3
  • 3
  • In regard to your last question, did you search it via your favorite search engine? A quick search revealed [this](http://stackoverflow.com/questions/3611457/android-temporarily-disable-orientation-changes-in-an-activity) and [this](http://stackoverflow.com/questions/20021803/disable-and-enable-orientation-changes-in-an-activity-in-android-programatically) even on stackoverflow. Please do research before asking. – Steffen Harbich Jul 21 '16 at 08:17
  • Welcome to Stack Overflow! I edited your question as far as I could guess your problem. However, add code and description so that more people with knowledge of the subject will see it. Please edit in the specific error-message you're encountering in case that's necessary to identify the specific problem. Good Luck! – Enamul Hassan Jul 23 '16 at 09:28
  • there is no error in the code The problem is the size of buttons Their size is same on all devices i.e. if I install it on a phone with smaller display, the doesn't fit in and if the phone has a large display major area of the screen is left un-used and the app fits in the display perfectly if display is around 5" as shown in the pictures – Usama Khan Jul 27 '16 at 11:59

0 Answers0