可以定义小部件的行为/布局在第三方发射器调整大小和方向的改变?发射器、第三方、部件、布局

由网友(怪你过分美丽)分享简介:我似乎无法找到以下问题与小窗口我想code什么:除了调整大小,能力的Andr​​oid 3.1引入的,我希望我的小部件是可调整大小的自定义发射像的LauncherPro或ADWLauncher。有没有一种方法,我可以定义我的插件改变它的布局,一旦它的大小?因此,例如,按键A被显示在左侧的2×1,但示于德适合的3x3。...

我似乎无法找到以下问题与小窗口我想code什么: 除了调整大小,能力的Andr​​oid 3.1引入的,我希望我的小部件是可调整大小的自定义发射像的LauncherPro或ADWLauncher。有没有一种方法,我可以定义我的插件改变它的布局,一旦它的大小?因此,例如,按键A被显示在左侧的2×1,但示于德适合的3x3。 此外,我希望它的外观/布局改变时,由于屏幕旋转小部件大小的变化(比如,因为3X1有不同的高度和宽度在横向和纵向)。

任何提示将是有益的。 多谢! 直到

解决方案   

有没有一种方法,我可以定义我的插件改变它的布局,一旦它的大小?

一旦它重新调整您的应用程序窗口小部件不改变其布局。

  

因此​​,例如,按键A被显示在左侧的2×1,但示于德适合的3x3

这不是可调整大小的小部件应用程序的目的。调整大小是使用的ListView 的GridView 等,将吸收更多的滚动空间。

  

此外,我希望它的外观/布局改变时,由于屏幕旋转小部件大小的变化(比如,因为3X1有不同的高度和宽度在横向和纵向)。

对于这一点,你应该能够使用标准方向的资源集(例如, RES /布局/ RES /布局陆/ )。

I can't seem to find anything on the following problem with a widget I want to code: Apart from the resize-ability introduced in Android 3.1, I want my widget to be resizable in custom launchers like LauncherPro or ADWLauncher. Is there a way I can define how my widget changes its layout once it's resized? So, for example, button A is shown on the left for 2x1 but is shown on te right for 3x3. Also I want it to change its appearance/layout when due to screen rotation the widget size changes (because e.g. 3x1 has different height and width in landscape and portrait).

艾媒报告 2019中国饰品产业发展状况与消费者行为变化监测调查报告

Any hints would be helpful. Thanks a lot! Till

解决方案

Is there a way I can define how my widget changes its layout once it's resized?

Your app widget doesn't change its layout once it's resized.

So, for example, button A is shown on the left for 2x1 but is shown on te right for 3x3.

That is not the purpose of resizeable app widgets. Resizing is for the use of ListView, GridView, etc., that will absorb the additional scrollable space.

Also I want it to change its appearance/layout when due to screen rotation the widget size changes (because e.g. 3x1 has different height and width in landscape and portrait).

For that, you should be able to use standard orientation resource sets (e.g., res/layout/ and res/layout-land/).

阅读全文

相关推荐

最新文章