EF's Blog

Posts Tagged ‘text

add this lines to your object in xml

android:scrollHorizontally=”true”
android:ellipsize=”end”
android:lines=”1″

Advertisements
Button   mButton;
EditText mEdit;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mButton = (Button)findViewById(R.id.button);
    mEdit   = (EditText)findViewById(R.id.edittext);

    mButton.setOnClickListener(
        new View.OnClickListener()
        {
            public void onClick(View view)
            {
                Log.v("EditText", mEdit.getText().toString());
            }
        });

EF’s Blog

I'm just ordinary people who lived in an extra-ordinary world.

EF's Blog Stats

  • 140,184 hits
December 2017
M T W T F S S
« Jul    
 123
45678910
11121314151617
18192021222324
25262728293031

Archives