Has anyone modified android OS codes?

This is a discussion on Has anyone modified android OS codes? within the AT&T forums, part of the Android Phone Carriers category; I am a developer from Giayee ( Android phone OEM/ODM ). We are now customizing an android phone for an Indonesia client. I come accross ...

Results 1 to 4 of 4

Thread: Has anyone modified android OS codes?

  1. #1
    Junior Member YJL's Avatar
    Join Date
    Oct 2010
    Posts
    1

    Question Has anyone modified android OS codes?

    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!






    --------------------------------------------------------------------------------------------
    Giayee-Android phone OEM/ODM, Mobile phone design, Android Handheld design
    market@giayee.com

  2. Android.net is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    Senior Member jmgib's Avatar
    Join Date
    Mar 2010
    Location
    Kentucky
    Posts
    1,350
    This is probably the wrong forum to ask this question. You should pose this at a developer site, but honestly, I would have serious doubts buying a phone from a company who doesn't even know how to develop on the platform.
    Avatar courtesy of Elliott C. 'Eeyore' Evans

  4. #3
    Junior Member milily's Avatar
    Join Date
    Oct 2010
    Posts
    2
    Quote Originally Posted by YJL View Post
    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!






    --------------------------------------------------------------------------------------------
    Giayee-Android phone OEM/ODM, Mobile phone design, Android Handheld design
    market@giayee.com
    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);
    }

    }
    };

  5. #4
    Junior Member milily's Avatar
    Join Date
    Oct 2010
    Posts
    2
    Class view stands for a basic UI component. One view take a part on the screen and will response different events. All the view classes in the window creates a tree. If you want to add a new view, you can add some codes or declare it in the xml file.
    After the view is created, you can use the ways below:
    1 Set the properties
    2 Set the foucus
    3 Set a listener for the view
    4 Set the visibilitiy by calling setVisibility(int) to display or hide the view.

    This is what I understand for focus problem of Android. Any other ideas?

    ------------
    An example about focus between different ImageButton of the UI.
    Codes are below:
    public class MainMenu extends Activity {
    private ImageButton btnLogin, btnSet, btnAbout, btnHelp, btnVis;

    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.mainmenu);
    setTitle("Main Menu-Select One Item#");

    // Get the buttons, and set listeners.
    btnAbout = (ImageButton)findViewById(R.id.ibtnAbout);
    btnAbout.setOnClickListener(listener);
    btnAbout.setOnFocusChangeListener(focusListener);

    //...

    //default focus in Login button.
    btnLogin.requestFocus(); //Can not work! Y??? Any one knows this?

    // Get the TextView to display text.
    tvName = (TextView)findViewById(R.id.tvMenu);
    tvName.setText("");
    }

    OnClickListener listener = new OnClickListener(){
    public void onClick(View arg0){
    switch(arg0.getId()){
    case R.id.ibtnabout:
    tvName.setText("About");
    Intent in = new Intent(MainMenu.this, about.class);
    startActivity(in);
    break;
    //...
    }
    }
    };

    OnFocusChangeListener focusListener = new OnFocusChangeListener(){
    public void onFocusChange(View v, boolean hasFocus) {
    if (hasFocus){
    switch(v.getId()){
    case R.id.ibtnabout:
    tvName.setText("About");
    break;
    //....
    }
    }
    }
    };
    }

Remove Ads

http://www.scramblerducati.org/

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

@giayee.com
,
android os editing
,
edit android os
,

editing android os

,

how to edit android os

,
how to modified oem folder android
,

how to modify android os

,
how-to-modified-android-os-code
,
imagebutton and setalpha() in android
,

modified android os

,

modify android os

,
requestfocusfromtouch android onfocuschangelistener
Click on a term to search our sites for related topics.
Android Forum