背景图片滚动禁用黑莓的主要领域经理 [英] background image scroll disable in Main field manager in blackberry

查看:343
本文介绍了背景图片滚动禁用黑莓的主要领域经理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序有一个 MainScreen 。这个屏幕包含许多垂直的水平现场经理和所有的内容与滚动。成功显示

In my application there is one MainScreen .This screen contain lots of Vertical and Horizontal field manager and all content display successfully with scroll .

这是我的主 VerticalFieldmanager code。

This is my main VerticalFieldmanager code .

vfm_Main = new VerticalFieldManager()
    {
            public void paint(Graphics g)
            {
                g.setColor(Color.WHITE);
                g.drawBitmap(0,0,mybackgroundImage.getWidth(),mybackgroundImage.getHeight(),mybackgroundImage,0,0);
                                    super.paint(g);
            }
            protected void sublayout(int maxWidth, int maxHeight) 
            {
                super.sublayout(Display.getWidth(),Display.getHeight());
                setExtent(Display.getWidth(),Display.getHeight());
            }
    };

有此屏幕的一个后台图像平局。当我滚动此屏幕可以看到这个画面的全部内容我的背景图片也与内容滚动..for这个原因,背景图片看起来那么blurY的,它是在屏幕的底部重复。

there is one background image draw for this screen . When i scroll this screen to see the full content of this screen my Background image also scroll with the content ..for that reason background image looks so blury and it is repeat at the bottom of the screen .

我要滚动只。所以如何实现这个该屏幕的内容..?

i want to scroll only the content of that screen .so how to implement this ..?

我有很多尝试,但没有得到任何suggetion和命中prevent是什么?
如果任何一个面临这样的问题,或有任何想法,请帮助我...

i had try alot but not getting any suggetion and hits to prevent that ? if any one facing this problem or have any idea please help me ...

先谢谢了!

推荐答案

您需要做的是这样的:

vfm_Main = new VerticalFieldManager()
{
            public void paint(Graphics g)
            {
                g.setColor(Color.WHITE);
                g.drawBitmap(0,0,mybackgroundImage.getWidth(),mybackgroundImage.getHeight(),mybackgroundImage,0,0);
                super.paint(g);
            }
            protected void sublayout(int maxWidth, int maxHeight) 
            {
                    super.sublayout(Display.getWidth(),Display.getHeight());
                    setExtent(Display.getWidth(),Display.getHeight());
            }
};

subver=new VerticalFieldManager(VERTICAL_SCROLL|VERTICAL_SCROLLBAR)
{
        protected void sublayout(int maxWidth, int maxHeight) 
        {
                 super.sublayout(Display.getWidth(),Display.getHeight()-3);//here we scroll the inner vertical
                 setExtent(Display.getWidth(),Display.getHeight()-3);
        }
 }
 //Write all the code here;
 subver.setpadding(1,0,0,0);
 vfm_main.add(subver);
 add(vfm_Main);

筛选图片:

就够了;

这篇关于背景图片滚动禁用黑莓的主要领域经理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆