Wednesday, 6 September 2017

What�s New in Support Library v26

Support Library v26 comes with a lot of new features, specifically: fonts as resources and downloadable fonts, access to backwards compatible emoji support via the new EmojiCompat library, the ability to allow the text size of your TextView to expand or contract automatically to fill its layout, the option to implement animations driven by physics forces with the �spring and fling� animations, improved parity with the Android framework, various form factors such as Wear and TV, and, finally, a library slimmed down by moving minSdk to 14 and dropping 1.4k methods.


For more info, check out:
Support Library Docs: https://goo.gl/rOJEa7

What's New in Android Support Library, Google I/O '17 talk:

Android Continuous Integration: Build-Deploy-Test Automation for Android Mobile Apps

Android Continuous Integration: Build-Deploy-Test Automation for Android Mobile Apps

Master continuous integration, deployment and automated testing for Android apps. You�ll see how to set up and tear down sandbox environments to test the end-user experience, where you�ll learn how to manage a mobile device in addition to the build machine. Android Continuous Integration applies a real-world CI pattern that has been thoroughly tested and implemented.

This book starts with continuous integration concepts and the tools and code needed to become proficient in continuous integration for Android apps. You�ll also follow acceptance test driven development (ATDD) best practice, giving you all the skills you need to become a better, more effective developer. Finally, you�ll learn about the Appium mobile automation library and the Jenkins continuous integration tool.

What You Will Learn
  • Understand how to build an Android mobile app from source
  • Set up a development or debugging environment for mobile apps
  • Integrate with the Nexus dependency management and application release tool
  • Work with the SonarQube code quality analyzer
  • Use debugging tools in Android
Who This Book Is For
Product owners/business analysts, QA/test engineers, developers and build/deploy engineers.

Wednesday, 16 August 2017

FREE eBook - Learning Python

FREE LEARNING PYTHON EBOOK

Discover the ins and outs of one of the most popular programming languages in the world today with the help of this eBook. Python is a dynamic and diverse language and can be used in everything from web applications to crunching raw data. No matter what you use it for though, we all have to start at the beginning; and Learning Python is your gateway to the world of professional Python development!

This book goes deeper than simply showing you how to build a Python app, giving you the fundamentals of Python programming that every developer needs to know to make the most of the language. Packed with tutorials and examples this title features everything from data structures, writing reusable code, testing, paradigms, and how Python can be adapted. This free eBook will help transform you from a complete beginner to someone ready to bring the best out of their projects.

So get this title now and see just why Python is so beloved today!

Download link: https://www.packtpub.com/packt/free-ebook/learning-python/




Wednesday, 19 July 2017

ExoPlayer: Flexible Media Playback for Android (Google I/O '17)


ExoPlayer is an open source media playback library for Android. Used by thousands of applications, it enables great media experiences and can be customized to suit individual needs. Recent additions to the library have ranged from a new high level API to advanced features such as multi-period DASH support and spatial audio. In this talk you�ll learn what�s new in ExoPlayer, as well as some of ExoPlayer�s key concepts, points of customization and inner workings.


Related Link:
> Android Developers > API Guides > Media and Camera > ExoPlayer


Tuesday, 18 July 2017

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 with drawableRight"
android:drawableRight="@mipmap/ic_launcher_round"/>
<EditText
android:id="@+id/edittext4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="EditText with drawableTop"
android:drawableTop="@mipmap/ic_launcher"/>
<EditText
android:id="@+id/edittext5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="EditText with drawableBottom"
android:drawableBottom="@mipmap/ic_launcher_round"/>
<EditText
android:id="@+id/edittext6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="EditText with background"
android:background="@mipmap/ic_launcher"/>
</LinearLayout>
</FrameLayout>


</LinearLayout>


Monday, 17 July 2017

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 with background #50FFFFFF"
android:textSize="28dp"
android:background="#50FFFFFF"/>
<EditText
android:id="@+id/edittext3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="EditText with background #FFFFFF"
android:textSize="28dp"
android:background="#FFFFFF"/>
<EditText
android:id="@+id/edittext4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="EditText with background #FFFFFF and alpha=0.5"
android:textSize="28dp"
android:background="#FFFFFF"
android:alpha="0.5"/>
</LinearLayout>
</FrameLayout>
</LinearLayout>

Sunday, 16 July 2017

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"
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="fill_parent"
android:layout_height="wrap_content"
android:hint="normal EditText"/>
<EditText
android:id="@+id/edittext2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="EditText with custom shape"
android:textColorHint="#B0B0B0"
android:textColor="#F0F0F0"
android:background="@drawable/myshape" />

</LinearLayout>