Canvas containing bitmap size proper adjustment in landscape and portrait mode

有些话、适合烂在心里 提交于 2019-12-02 21:51:40

问题


Consider the following image as an example:

  • Landscape mode

In Landscape mode, there are 2 sides viz- left side containing fragment 1 and right side containing fragment 2.

The left side (fragment 1) view is fine meaning - buttons are proper, text is coming with right alignment without any overlap/mix with other text.

The right side (fragment 2) view is a chart and its format is not coming correct on the 7' screen. Chart font covers the sides of the grid (on both sides of the grid), chart buttons are narrowed to a single letter.

  • Portrait mode

In portrait mode, there is only 1 side viz - right side only containing fragment 2.

The 7' screen (tablet device) is small enough in portrait mode that although there is only one fragment (fragment 2) containing chart, but this chart is having same problems as with landscape mode.

Is it possible to reduce the right side chart in landscape mode to get proper view without any text mixing with the chart Or how to do the same for portrait mode?

Any alternatives or ideas?

I found that there is no auto adjustment of views according to orientations although I have proper folders-

res/layout-large/activity_main.xml and res/layout-large-land/activity_main.xml.

where

res/layout-large/activity_main.xml- Showing portrait orientation view.

res/layout-large-land/activity_main.xml- Showing landscape orientation view.

来源:https://stackoverflow.com/questions/17103026/canvas-containing-bitmap-size-proper-adjustment-in-landscape-and-portrait-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!