Android Forums

Go Back   These FORUMS ARE DISABLED!! OUR NEW FORUMS ARE AT http://androidforum.com/ > Android Coders > Android Development, Answers, Tutorials, and Code Snippets
Connect with Facebook

Click Here To Register!
 
 
LinkBack Thread Tools Display Modes
Old 10-18-2010, 02:57 AM   #1
Giayee
 
Join Date: Oct 2010
Location: China http://www.giayee.com/
Posts: 3
Friends: 0
View yangjl's Profile   View yangjl's Photo Album   View yangjl's Blog   View Social Groups
Send a message via Yahoo to yangjl Send a message via Skype™ to yangjl
I am a developer from Giayee ( Android phone OEM/ODM ) . We are now customizing an android phone for an Indonesia client. I come accross a problem with the UI. Because the LCD of android phone cutomized by us is smaller than the default setting in android OS codes, so some UI elements should be modified to be suitable to the smaller LCD. But when I changed all the UI elements smaller, the trackball can't be focused on those UI elements. Anyone come accross this problem? Please help me. Thanks!
yangjl is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 10-20-2010, 01:45 AM   #2
New Member
 
Join Date: Oct 2010
Posts: 2
Friends: 0
View makio's Profile   View makio's Photo Album   View makio's Blog   View Social Groups
Hello, today I resolved a focus problem. Hope this will give you some help.
The keypoint lies in the 'touchMode' of android. Developer from JavaSpring platfrom will concentrate on setFocusable()and requestFocus(). But there are two others functions in Android: setFocusableInTouchMode() and requestFocusFromTouch(). These two are the keypoint for focus problem in Android.

And there is a isInTouchMode() function in class 'View', this can help us monitor whether click() is exeucted during 'Focuse' event time. You can see the codes below:

ImageButton.OnFocusChangeListener mFocusChangeListener = new ImageButton.OnFocusChangeListener(){

public void onFocusChange(View v, boolean hasFocus) {
Log.d("FocuseChange", "Focuse has changed.");
if (hasFocus) {

// If it is touchmode, click is executed. Otherwise it is on be highlighted
v.setBackgroundDrawable(getResources().getDrawable (R.drawable.));

if (v.isInTouchMode()){

((ImageButton)v).performClick();
}
} else {
v.setBackgroundDrawable(getResources().getDrawable (R.));
v.getBackground().setAlpha(100);
}

}
};
makio is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Has anyone modified android OS codes? yangjl Android Development, Answers, Tutorials, and Code Snippets 4 10-31-2010 07:24 PM
Source codes for android? nithyakrishnan Android Hardware 0 08-30-2010 12:10 PM


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 05:35 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2012 TalkAndroid.com. All rights reserved.