Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Sunday 19 May 2019

Learning Embedded Android N Programming by Ivan Morgillo (Author), Stefano Viola (Author)

Create the perfectly customized system by unleashing the power of Android OS on your embedded device About This Book * Understand the system architecture and how the source code is organized * Explore the power of Android and customize the build system 

* Build a fully customized Android version as per your requirements Who This Book Is For If you are a Java programmer who wants to customize, build, and deploy your own Android version using embedded programming, then this book is for you. What You Will Learn *

 Master Android architecture and system design * Obtain source code and understand the modular organization * Customize and build your first system image for the Android emulator * Level up and build your own Android system for a real-world device * 

Use Android as a home automation and entertainment system * Tailor your system with optimizations and add-ons * Reach for the stars: look at the Internet of Things, entertainment, and domotics In Detail Take a deep dive into the Android build system and its customization with Learning Embedded Android Programming, written to help you master the steep learning curve of working with embedded Android. Start by exploring the basics of Android OS, discover Google's "repo" system, and discover how to retrieve AOSP source code. 

You'll then find out to set up the build environment and the first AOSP system. Next, learn how to customize the boot sequence with a new animation, and use an Android "kitchen" to "cook" your custom ROM. By the end of the book, you'll be able to build customized Android open source projects by developing your own set of features. 

Style and approach This step-by-step guide is packed with various real-world examples to help you create a fully customized Android system with the most useful features available.

Buy :

Learning Embedded Android N Programming Paperback – Import, 6 Jan 2016 by Ivan Morgillo (Author), Stefano Viola (Author) 

PDF Download :

Learning Embedded Android N Programming Paperback – Import, 6 Jan 2016 by Ivan Morgillo (Author), Stefano Viola (Author) 



Thursday 2 May 2019

Make Your Own Twine Games! Paperback – Import, 26 Mar 2019 by Anna Anthropy (Author)

Twine is a free online tool that lets anyone new to programming create their own interactive, story-based adventure games in a web page.

In Make Your Own Twine Games!, game designer Anna Anthropy takes you step-by-step through the game development process, from coming up with a basic idea to structuring your game. You’ll learn the basics of Twine like how to use links and apply images and formatting to make your game look more distinct. You’ll get tips on how to test your game, export it, and publish it online, and even understand more advanced features like scripting to get your game to remember and respond to player choices. As you make your way through the book and begin crafting your own interactive fiction, you’ll learn other cool tricks like how to:

• Write stories that follow multiple paths using hyperlinks
• Create variables to track your player’s actions
• Add scripting like “if” and “else” to decide when ghosts should appear in your game
• Use hooks to add fancy touches like text effects, pictures, and sound 

With example games to act as inspiration, Make Your Own Twine Games! will take you from story-teller to game designer in just a few clicks! Ready player one? The game starts now.

Covers Twine 2


Buy :

Make Your Own Twine Games! Paperback – Import, 26 Mar 2019 by Anna Anthropy (Author) 

PDF Download :

Make Your Own Twine Games! Paperback – Import, 26 Mar 2019 by Anna Anthropy (Author) 




Friday 22 March 2019

Mastering OpenCV Android Application Programming Paperback – Import, 29 Jul 2015 by Salil Kapur (Author), Nisarg Thakkar (Author)

If you are a Java and Android developer looking to enhance your skills by learning the latest features of OpenCV Android application programming, then this book is for you.

Buy :

Mastering OpenCV Android Application Programming Paperback – Import, 29 Jul 2015 by Salil Kapur (Author), Nisarg Thakkar (Author) 
PDF Download :

Mastering OpenCV Android Application Programming Paperback – Import, 29 Jul 2015 by Salil Kapur (Author), Nisarg Thakkar (Author) 

Saturday 16 March 2019

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android

Now, one book can help you master mobile app development with both market-leading platforms: Apple’s iOS and Google’s Android. Perfect for both students and professionals, Learning Mobile App Development is the only tutorial with complete parallel coverage of both iOS and Android. With this guide, you can master either platform, or both—and gain a deeper understanding of the issues associated with developing mobile apps.



You’ll develop an actual working app on both iOS and Android, mastering the entire mobile app development lifecycle, from planning through licensing and distribution.

Each tutorial in this book has been carefully designed to support readers with widely varying backgrounds and has been extensively tested in live developer training courses. If you’re new to iOS, you’ll also find an easy, practical introduction to Objective-C, Apple’s native language.



All source code for this book, organized by chapter, is available at https://github.com/LearningMobile/BookApps



Coverage includes

Saturday 9 March 2019

Android Application Development For Dummies

The Android OS continues to rapidly expand offering app developers access to one of the largest platforms available, and this easy–to–follow guide walks you through the development process step by step. In this new edition of the bestselling Android Application Development For Dummies, Android programming experts Michael Burton and Donn Felker explain how to download the SDK, get Eclipse up and running, code Android applications, and share your finished products with the world.
 Buy :

PDF Download :


Featuring two sample programs, this book explores everything from the simple basics to advanced aspects of Android application development.

  • Walks you through all the steps in developing applications for the Android platform, including the latest Android features like scrollable widgets, enhanced UI tools, social media integration, and new calendar and contact capabilities
  • Starts off with downloading the SDK, then explains how to bring your applications to life and submit your work to the Android Market
  • Includes real–world advice from expert programmers Donn Felker and Michael Burton, who break every aspect of the development process down into practical, digestible pieces

Whether you′re new to Android development or already on your way, Android Application Development For Dummies, 2nd Edition is the guide you need to dig into the app dev process!

Friday 15 February 2019

TextView in Android

In Android, TextView displays text to the user and optionally allows them to edit it programmatically.
TextView is a complete text editor, however basic class is configured to not allow editing but we can edit it.


View is the parent class of TextView. Being a subclass of view the text view component can be used in your app’s
GUI inside a ViewGroup, or as the content view of an activity.
We can create a TextView instance by declaring it inside a layout(XML file) or by instantiating
it programmatically(Java Class).
TextView code in XML:

<TextView android:id="@+id/simpleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PirawenAndroid" />
TextView code in JAVA:

TextView textView = (TextView) findViewById(R.id.textView);

textView.setText("PirawenAndroid"); //set text for text view


Attributes of TextView:
Now let’s we discuss about the attributes that helps us to configure a TextView in your xml file.
1. id: id is an attribute used to uniquely identify a text view. Below is the example code in which we set
the id of a text view.
<TextView
android:id="@+id/simpleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

2. gravity: The gravity attribute is an optional attribute which is used to control the alignment of the
text like left, right, center, top, bottom, center_vertical, center_horizontal etc.
Below is the example code with explanation included in which we set the center_horizontal gravity for text
of a TextView.
<TextView
android:id="@+id/simpleTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="PirawenAndroid"
android:textSize="20sp"
android:gravity="center_horizontal"/> <!--center horizontal gravity-->

3. text: text attribute is used to set the text in a text view. We can set the text in xml as well as in the java class.
Below is the example code with explanation included in which we set the text “PirawenAndroid” in a text view.

<TextView
android:id="@+id/simpleTextView"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="25sp"
android:text="PirawenAndroid"/><!--Display Text as PirawenAndroid-->
In Java class:
Below is the example code in which we set the text in a textview programmatically means in java class.
TextView textView = (TextView)findViewById(R.id.textView);
textView.setText("PirawenAndroid"); //set text for text view
4. textColor: textColor attribute is used to set the text color of a text view.
Color value is in the form of “#argb”, “#rgb”, “#rrggbb”, or “#aarrggbb”.
Below is the example code with explanation included in which we set the red color for the displayed text.
<TextView
android:id="@+id/simpleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PirawenAndroid"
android:layout_centerInParent="true"
android:textSize="25sp"
android:textColor="#f00"/><!--red color for text view-->


In Java class:
Below is the example code in which we set the text in a textview programmatically means in java class.
TextView textView = (TextView)findViewById(R.id.textView);
textView.setText("PirawenAndroid"); //set text for text view
4. textColor: textColor attribute is used to set the text color of a text view.
Color value is in the form of “#argb”, “#rgb”, “#rrggbb”, or “#aarrggbb”.
Below is the example code with explanation included in which we set the red color for the displayed text.
<TextView
android:id="@+id/simpleTextView"
android:layout_width="wrap_content"

android:layout_height="wrap_content"
android:text="PirawenAndroid"
android:layout_centerInParent="true"
android:textSize="25sp"
android:textColor="#f00"/><!--red color for text view-->

In Java class:
Below is the example code in which we set the text size of a text view programmatically means in java class.
TextView textView = (TextView)findViewById(R.id.textView);
textView.setTextSize(20); //set 20sp size of text

6. textStyle: textStyle attribute is used to set the text style of a text view.
The possible text styles are bold, italic and normal.  If we need to use two or more styles for a text view then
“|” operator is used for that.
Below is the example code with explanation included in which we  set the bold and italic text styles for text.

<TextView
   android:id="@+id/simpleTextView"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:text="PirawenAndroid"
   android:layout_centerInParent="true"
   android:textSize="40sp"
   android:textStyle="bold|italic"/><!--bold and italic text style of text-->
7. background: background attribute is used to set the background of a text view.
We can set a color or a drawable in the background of a text view.
8. padding: padding attribute is used to set the padding from left, right, top or bottom.
In above example code of background we also set the 10dp padding from all the side’s of text view.
Below is the example code with explanation included in which we set the black color for the background,
white color for the displayed text and set 10dp padding from all the side’s for text view.
<TextView
android:id="@+id/simpleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PirawenAndroid"
android:layout_centerInParent="true"
android:textSize="40sp"
android:padding="10dp"
android:textColor="#fff"
android:background="#000"/> <!--red color for background of text view-->
In Java class:
Below is the example code in which we set the background color of a text view programmatically means in
java class.
TextView textView = (TextView)findViewById(R.id.textView);
textView.setBackgroundColor(Color.BLACK);//set background color

Example of TextView:
Below is the example of TextView in which we display a text view and set the text in xml file and then change
the text on button click event programmatically. Below is the final output and code:
Step 1: Create a new project and name it textViewExample.

Select File -> New -> New Project. Fill the forms and click "Finish" button.
Step 2: Open res -> layout -> xml (or) activity_main.xml and add following code.
Here we will create a button and a textview in Relative Layout.

<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
   android:paddingLeft="@dimen/activity_horizontal_margin"
   android:paddingRight="@dimen/activity_horizontal_margin"
   android:paddingTop="@dimen/activity_vertical_margin"
   tools:context=".MainActivity">

   <TextView
       android:id="@+id/simpleTextView"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_centerHorizontal="true"
       android:text="Before Clicking"
       android:textColor="#f00"
       android:textSize="25sp"
       android:textStyle="bold|italic"
       android:layout_marginTop="50dp"/>

   <Button
       android:id="@+id/btnChangeText"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_centerInParent="true"

       android:background="#f00"
       android:padding="10dp"
       android:text="Change Text"
       android:textColor="#fff"
       android:textStyle="bold" />
</RelativeLayout>


Step 3: Open app -> java -> package and open MainActivity.java and add the following code.
Here we will change the text of TextView after the user click on Button.

package example.irawen.textviewexample;

import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;

import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

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

       final TextView simpleTextView = (TextView) findViewById(R.id.simpleTextView);

//get the id for TextView

       Button changeText = (Button) findViewById(R.id.btnChangeText); //get the id for button

       changeText.setOnClickListener(new View.OnClickListener() {
           @Override

           public void onClick(View view) {
               simpleTextView.setText("After Clicking"); //set the text after clicking button

           }
       });
   }


}

Output:
Now run the app in Emulator and click on the button. You will see text will change “After Clicking”.
 

Popular Posts

Categories

AI (27) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (114) C (77) C# (12) C++ (82) Course (60) Coursera (176) coursewra (1) Cybersecurity (22) data management (11) Data Science (88) Data Strucures (6) Deep Learning (9) Django (6) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (5) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (92) Leet Code (4) Machine Learning (44) Meta (18) MICHIGAN (5) microsoft (3) Pandas (3) PHP (20) Projects (29) Python (741) Python Coding Challenge (190) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (40) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses