Google’s Internet of Things platform: Android Things and Weave

Google announced updates to Google’s Internet of Things platform: Android Things and Weave, to know the details, refer Announcing updates to Google’s Internet of Things platform: Android Things and Weave To get started, check out Google’s IoT developer site, or go directly to the Android Things, Weave, and Google Cloud Platform…

read more

EditText with drawable icon

<?xml version=”1.0″ encoding=”utf-8″?><LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_margin=”20dp” android:orientation=”vertical” tools:context=”com.blogspot.android_er.androidedittextchanged.MainActivity”> <FrameLayout android:layout_width=”match_parent” android:layout_height=”match_parent”> <ImageView android:layout_width=”match_parent” android:layout_height=”match_parent” android:src=”@android:mipmap/sym_def_app_icon”/> <LinearLayout android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical”> <TextView android:id=”@+id/title” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_gravity=”center_horizontal” android:layout_marginTop=”10dp” android:layout_marginBottom=”10dp” android:autoLink=”web” android:text=”http://android-er.blogspot.com/” android:textStyle=”bold”/> <EditText android:id=”@+id/edittext1″ android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”normal EditText”/> <EditText android:id=”@+id/edittext2″ android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”EditText with drawableLeft” android:drawableLeft=”@mipmap/ic_launcher”/> <EditText android:id=”@+id/edittext3″ android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”EditText…

read more

Shut the HAL Up

Posted by Jeff Vander Stoep, Senior Software Engineer, Android Security Updates are essential for security, but they can be difficult and expensive for device manufacturers. Project Treble is making updates easier by separating the underlying vendor implementation from the core Android framework. This modularization allows platform and vendor-provided components to…

read more

Set background and alpha of EditText

Examples of Setting background and alpha of EditText: <?xml version=”1.0″ encoding=”utf-8″?><LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_margin=”20dp” android:orientation=”vertical” tools:context=”com.blogspot.android_er.androidedittextchanged.MainActivity”> <FrameLayout android:layout_width=”match_parent” android:layout_height=”match_parent”> <ImageView android:layout_width=”match_parent” android:layout_height=”match_parent” android:src=”@android:mipmap/sym_def_app_icon”/> <LinearLayout android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical”> <TextView android:id=”@+id/title” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_gravity=”center_horizontal” android:layout_marginTop=”10dp” android:layout_marginBottom=”10dp” android:autoLink=”web” android:text=”http://android-er.blogspot.com/” android:textStyle=”bold”/> <EditText android:id=”@+id/edittext1″ android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:textSize=”28dp” android:text=”normal EditText”/> <EditText android:id=”@+id/edittext2″ android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”EditText…

read more

EditText with custom shape (drawable)

To create EditText with our own shape, create a drawable XML to define our custom shape: res/drawable/myshape.xml <?xml version=”1.0″ encoding=”utf-8″?><shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”rectangle” android:padding=”10dp”> <solid android:color=”#505050″/> <corners android:bottomRightRadius=”10dp” android:bottomLeftRadius=”10dp” android:topLeftRadius=”10dp” android:topRightRadius=”10dp”/></shape> Reference my shape in layout xml: <?xml version=”1.0″ encoding=”utf-8″?><LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_margin=”20dp” android:orientation=”vertical” tools:context=”com.blogspot.android_er.androidedittextchanged.MainActivity”> <TextView android:id=”@+id/title” android:layout_width=”wrap_content” android:layout_height=”wrap_content”…

read more