Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8175511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:48:32+00:00 2026-06-06T22:48:32+00:00

I’ve been looking for an example of characterpickerdialog usage but haven’t found any. Would

  • 0

I’ve been looking for an example of characterpickerdialog usage but haven’t found any. Would you mind posting it ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:48:34+00:00Added an answer on June 6, 2026 at 10:48 pm

    CharacterPickerDialog example:

    EXAMPLE 1:

    public class CharacterPickerDialogTest extends Activity {  
    
        private RelativeLayout mainView = null;  
        private TextView tv = null;  
        private Button button = null;  
        private CharacterPickerDialog cpd = null;  
    
        public void onCreate(Bundle savedInstanceState) {  
            super.onCreate(savedInstanceState);  
            mainView = new RelativeLayout(this);  
            tv = new TextView(this);  
            RelativeLayout.LayoutParams lp_tv = new RelativeLayout.LayoutParams(-2,-2);  
            lp_tv.addRule(RelativeLayout.CENTER_IN_PARENT);  
            tv.setLayoutParams(lp_tv);  
            tv.setGravity(Gravity.CENTER_HORIZONTAL);  
            tv.setText(" shown here result");  
            button = new Button(this);  
            RelativeLayout.LayoutParams lp_button = new RelativeLayout.LayoutParams(-2, -2);  
            lp_button.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);  
            lp_button.addRule(RelativeLayout.CENTER_HORIZONTAL);  
            button.setLayoutParams(lp_button);  
            button.setText("open");  
            button.setOnClickListener(new OnClickListener() {  
                public void onClick(View v) {  
                    if (cpd == null) {  
                        cpd_init();  
                    }  
                    cpd.show();  
                }  
            });  
            mainView.addView(tv);  
            mainView.addView(button);  
            setContentView(mainView);  
        }  
    
       // Cpd initialization
        void cpd_init() {  
            EditText et=new EditText(this);  
            et.setLayoutParams(new LinearLayout.LayoutParams(-1,-2));  
            final String options="0123456789ABCDEF";  
            cpd= new CharacterPickerDialog(this, new View(this), null,options,false){  
                public void onClick (View v){  
                    //tv.setText("????"+((Button)v).getText().toString());   
                    dismiss();   
                }  
                public void onItemClick (AdapterView parent, View view, int position, long id){  
                    tv.setText("You pressed Button"+((Button)view).getText().toString()+"\n");   
                    tv.append("the Button's position is"+position+"\n");  
                    tv.append("the buton ID"+id);  
                    dismiss();   
                }  
            };  
    
        }  
    }  
    

    EXAMPLE 2: easy just show on button click:

    public  class CharacterPickerDialogDialogActivity extends Activity {
         Private CharacterPickerDialog CPD = null ;
    
        / ** Called when the Activity is Created first. * / 
        @ Override 
        public  void onCreate (Bundle SavedInstanceState) {
             Super onCreate (SavedInstanceState).;
            setContentView (R.layout.main);
    
            Button button = (Button) this . findViewById (R.Id.Button01);
            Button.SetOnClickListener ( new View.OnClickListener () {
                 @ Override 
                public  void onClick (View v) {
                    cpd.show();
                }
            });
    
            String options = "0123456789ABCDEF" ;
            CPD = new CharacterPickerDialog(this,new View(this),null,options,false) {
                 public  void (View v) {onClick
                     onClick does the processing of the Cancel button / /
                    Toast.makeText (getApplicationContext (),
                            "OnClick!" + ((Button) v). getText (). toString (),
                            Toast.LENGTH_SHORT).show();
                    dismiss();
                }
    
                public  void OnItemClick(AdapterView parent, View View, int position, long id)
                {
                    / / OnItemClick does the processing of character button 
                    String message = ( "OnItemClick!" + ((Button) View). getText(). toString())
                            + "position =" +
                            position
                            + "id =" + id;
                    Toast.makeText (getApplicationContext(), message, Toast.LENGTH_SHORT).show();
                    dismiss();
                }
            ;}
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.