Showing posts with label signed. Show all posts
Showing posts with label signed. Show all posts

Limit EditText to accept signed decimal numbers only in xml and java

| 0 comments |

layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout


android_layout_width="match_parent"
android_layout_height="match_parent"
android_padding="16dp"
android_orientation="vertical"
tools_context=".MainActivity">

<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />

<EditText
android_id="@+id/edittext1"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_inputType="numberSigned|numberDecimal"/>
<EditText
android_id="@+id/edittext2"
android_layout_width="match_parent"
android_layout_height="wrap_content"/>

</LinearLayout>


MainActivity.java
package com.blogspot.android_er.androiddecimalnumberedittext;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.InputType;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

EditText editText1 = (EditText)findViewById(R.id.edittext1);
EditText editText2 = (EditText)findViewById(R.id.edittext2);
editText2.setInputType(InputType.TYPE_CLASS_NUMBER
| InputType.TYPE_NUMBER_FLAG_DECIMAL
| InputType.TYPE_NUMBER_FLAG_SIGNED);
}
}

Read More..

Opera Mobile v12 00 2144 Another Update S60v3 S60v5 Symbian 3 Nokia Anna Belle Signed Free App Download

| 0 comments |
"Another Update for Opera 12 From v12.00(2143) To v12.00(2144) "
Opera Mobile was launched in 2000 as the first mobile browser to bring the full Web to the small mobile screen. Since 2004 it has been installed on 100 million phones. Opera Mobile has pioneered and set the standard in mobile browsing,

Read more »»
Read More..