Posts

Download latest Philz Recovery,CWM Recovery,TWRP Recovery for Android Mobiles | Philz Recovery | CWM Recovery | TWRP Recovery

Recoveries ◄◄ Philz Recovery - Link :-  http:// forum.xda-developers.com/ crossdevice-dev/ android-one-general/ sprout-philz-touch-v6-57-9-t288 7574 CWM Recovery - Link :-  http:// forum.xda-developers.com/ crossdevice-dev/ android-one-general/ recovery-clockworkmod-recovery- 6-0-5-1-t2885736 TWRP Recovery - Link :-  http://teamw.in/project/twrp2/ 268

Communicating with the UI Thread with Handlers

Every app has its own special thread that runs UI objects such as  View  objects; this thread is called the UI thread. Only objects running on the UI thread have access to other objects on that thread. Because tasks that you run on a thread from a thread pool  aren't  running on your UI thread, they don't have access to UI objects. To move data from a background thread to the UI thread, use a  Handler  that's running on the UI thread Define a Handler on the UI Thread Handler  is part of the Android system's framework for managing threads. A  Handler  object receives messages and runs code to handle the messages. Normally, you create a  Handler  for a new thread, but you can also create a  Handler  that's connected to an existing thread. When you connect a  Handler  to your UI thread, the code that handles messages runs on the UI thread. Instantiate the  Handler  object in the constructor for the...

What is Wrapper class and uses in java

Java is an object-oriented language and can view everything as an object. A simple file can be treated as an object , an address of a system can be seen as an object , an image can be treated as an object (with java.awt.Image) and a simple data type can be converted into an object (with wrapper classes). This tutorial discusses wrapper classes. Wrapper classes are used to convert any data type into an object. The primitive data types are not objects; they do not belong to any class; they are defined in the language itself. Sometimes, it is required to convert data types into objects in Java language. For example, upto JDK1.4, the data structures accept only objects to store. A data type is to be converted into an object and then added to a Stack or Vector etc. For this conversion, the designers introduced wrapper classes. What are Wrapper classes? As the name says, a wrapper class wraps (encloses) around a data type and gives it an object appearance. Wherever, the data type is ...

Add and Replace a Fragment to an Activity at Runtime with Example

Image
Two fragments, displayed in different configurations for the same activity on different screen sizes. On a large screen, both fragments fit side by side, but on a handset device, only one fragment fits at a time so the fragments must replace each other as the user navigates. The  FragmentManager  class provides methods that allow you to add, remove, and replace fragments to an activity at runtime in order to create a dynamic experience. To perform a transaction such as add or remove a fragment, you must use the  FragmentManager  to create a  FragmentTransaction , which provides APIs to add, remove, replace, and perform other fragment transactions. If your activity allows the fragments to be removed and replaced, you should add the initial fragment(s) to the activity during the activity's  onCreate() method. An important rule when dealing with fragments—especially when adding fragments at runtime—is that your activity layout must include a c...

Custom Toast In Android

Image
This Is Code For Custom Toast... Main Activity package com.example.ramana.CustomToast; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import android.widget.Toast; import org.w3c.dom.Text; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); LayoutInflater li = getLayoutInflater(); View layout = li.inflate(R.layout.customtoast, null); TextView textView = (TextView) layout.findViewById(R.id.textView); Toast toast = new Toast(this); toast.setDuration(Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0); textView.setText("ASHOK"); ...

Insert Data To database With Android sqlite Easily

public void insertContact(Contact contact) { db=this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(KEY_NAME, contact.getName()); values.put(KEY_PASS, contact.getPassword()); long rowInserted = db.insert(TABLE_NAME, null, values); if(rowInserted == -1) { Log.d("Result :","Not Inserted"); } else Log.d("Result :", "Inserted"); }

Install Marshmallow OTA update on Android One Mobiles | Karbonn Sparkle V | Micromax Canvas A1 (AQ4501) | Spice Dream Uno

Image
Downloads Required First-gen Android One devices codenamed Sprout4 Karbonn Sparkle V Micromax Canvas A1 (AQ4501) Spice Dream Uno Prerequisites Back up important data and settings on your smartphone before you proceed with installing the Marshmallow update Verify that your smartphone has at least 80% battery charge to prevent unexpected device shutdown, during the firmware installation Your smartphone must be running stock firmware with stock recovery installed Steps to manually install Android 6.0 Marshmallow OTA update on Android One Sprout4 devices Step 1: Download  the official Marshmallow OTA update using the links provided. Step 2: Connect  your smartphone to computer using the original USB cable. Step 3:  Copy and paste the OTA zip files to phone's storage and make a note of its location. Step 4:  Boot your smartphone into  recovery mode  or stock recovery: Disconnect the phone from computer, and then turn it off. ...