[Scheduled release] A new activity stream in Drive shows you what’s changed

Posted by Unknown Jumat, 31 Januari 2014 0 komentar
Over the next few days, you’ll notice a new activity stream in Drive. When you open Drive, click the “Details and activity” button (ⓘ) on the top right corner and the activity stream will appear, showing you who has taken action on files and folders in My Drive. You’ll see a rundown of what your team has been doing, such as editing and commenting on notes, adding a new spreadsheet, renaming a presentation, etc. If you select a specific file or folder, the stream will change to show you specific information about that item.

Release track:
Scheduled release

Editions included: 
Google Apps for Business, Education, and Government

For more information:
https://support.google.com/drive/answer/3323935
http://googledrive.blogspot.com/2014/01/a-new-activity-stream-in-drive-shows.html

whatsnew.googleapps.com
Get these product update alerts by email
Subscribe to the RSS feed of these updates

Baca Selengkapnya ....

Hijacked Chrome extensions cleanup

Posted by Unknown 0 komentar
We have found that some Chrome extensions come bundled with malicious programs that try to hijack your browser settings. To help keep your browser settings under your control we added a “reset browser settings” button to Chrome’s settings page in October.

Despite this, settings hijacking remains our number one user complaint. To make sure the reset option reaches everyone who might need it, Chrome will be prompting Windows users whose settings appear to have been changed if they’d like to restore their browser settings back to factory default. If you’ve been affected by settings hijacking and would like to restore your settings, just click “Reset” on the prompt when it appears.

Note that this will disable any extensions, apps and themes you have installed. If you’d like to reactivate any of your extensions after the reset, you can find and re-enable them by looking in the Chrome menu under “More tools > Extensions.” Apps are automatically re-enabled the next time you use them.

Editions included: 
Google Apps for Business, Education, and Government

For more information:
http://chrome.blogspot.com/2014/01/clean-up-your-hijacked-settings.html
http://chrome.blogspot.com/2013/10/dont-mess-with-my-browser.html

whatsnew.googleapps.com
Get these product update alerts by email
Subscribe to the RSS feed of these updates

Baca Selengkapnya ....

List UsbDevice, UsbInterface and UsbEndpoint in USB Host mode

Posted by Unknown 0 komentar
I have a simple example "List attached USB devices in USB Host mode" in old post. It's modified to get various UsbDevice, UsbInterface and UsbEndpoint here.

UsbDevice, UsbInterface and UsbEndpoint in USB Host mode
UsbDevice, UsbInterface and UsbEndpoint in USB Host mode
As mentioned in the old post, have to specify the app to be run as UDB Host, add uses-feature of "android.hardware.usb.host", and android:minSdkVersion="12" in AndroidManifest.xml.

MainActivity.java
package com.example.androidusbhost;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

import android.hardware.usb.UsbConstants;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbEndpoint;
import android.hardware.usb.UsbInterface;
import android.hardware.usb.UsbManager;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.app.Activity;
import android.content.Context;

public class MainActivity extends Activity {

Button btnCheck;
TextView textInfo;
TextView textInfoInterface;
TextView textEndPoint;

Spinner spDeviceName;
ArrayList<String> listDeviceName;
ArrayList<UsbDevice> listUsbDevice;
ArrayAdapter<String> adapterDevice;

Spinner spInterface;
ArrayList<String> listInterface;
ArrayList<UsbInterface> listUsbInterface;
ArrayAdapter<String> adapterInterface;

Spinner spEndPoint;
ArrayList<String> listEndPoint;
ArrayList<UsbEndpoint> listUsbEndpoint;
ArrayAdapter<String> adapterEndpoint;

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

spDeviceName = (Spinner)findViewById(R.id.spinnerdevicename);
spInterface = (Spinner)findViewById(R.id.spinnerinterface);
spEndPoint = (Spinner)findViewById(R.id.spinnerendpoint);
textInfo = (TextView) findViewById(R.id.info);
textInfoInterface = (TextView)findViewById(R.id.infointerface);
textEndPoint = (TextView)findViewById(R.id.infoendpoint);

btnCheck = (Button) findViewById(R.id.check);
btnCheck.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
checkDeviceInfo();
}
});
}

private void checkDeviceInfo() {

listDeviceName = new ArrayList<String>();
listUsbDevice = new ArrayList<UsbDevice>();

UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
HashMap<String, UsbDevice> deviceList = manager.getDeviceList();
Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();

while (deviceIterator.hasNext()) {
UsbDevice device = deviceIterator.next();
listDeviceName.add(device.getDeviceName());
listUsbDevice.add(device);

}

textInfo.setText("");
textInfoInterface.setText("");
textEndPoint.setText("");

adapterDevice = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, listDeviceName);
adapterDevice.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spDeviceName.setAdapter(adapterDevice);
spDeviceName.setOnItemSelectedListener(deviceOnItemSelectedListener);
}

OnItemSelectedListener deviceOnItemSelectedListener =
new OnItemSelectedListener(){

@Override
public void onItemSelected(AdapterView<?> parent,
View view, int position, long id) {
UsbDevice device = listUsbDevice.get(position);

String i = device.toString() + "\n" +
"DeviceID: " + device.getDeviceId() + "\n" +
"DeviceName: " + device.getDeviceName() + "\n" +
"DeviceClass: " + device.getDeviceClass() + " - "
+ translateDeviceClass(device.getDeviceClass()) + "\n" +
"DeviceSubClass: " + device.getDeviceSubclass() + "\n" +
"VendorID: " + device.getVendorId() + "\n" +
"ProductID: " + device.getProductId() + "\n" +
"InterfaceCount: " + device.getInterfaceCount();
textInfo.setText(i);

checkUsbDevicve(device);
}

@Override
public void onNothingSelected(AdapterView<?> parent) {}

};

private void checkUsbDevicve(UsbDevice d) {
listInterface = new ArrayList<String>();
listUsbInterface = new ArrayList<UsbInterface>();

for(int i=0; i<d.getInterfaceCount(); i++){
UsbInterface usbif = d.getInterface(i);
listInterface.add(usbif.toString());
listUsbInterface.add(usbif);
}

adapterInterface = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, listInterface);
adapterDevice.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spInterface.setAdapter(adapterInterface);
spInterface.setOnItemSelectedListener(interfaceOnItemSelectedListener);
}

OnItemSelectedListener interfaceOnItemSelectedListener =
new OnItemSelectedListener(){

@Override
public void onItemSelected(AdapterView<?> parent,
View view, int position, long id) {

UsbInterface selectedUsbIf = listUsbInterface.get(position);

String sUsbIf = "\n" + selectedUsbIf.toString() + "\n"
+ "Id: " + selectedUsbIf.getId() + "\n"
+ "InterfaceClass: " + selectedUsbIf.getInterfaceClass() + "\n"
+ "InterfaceProtocol: " + selectedUsbIf.getInterfaceProtocol() + "\n"
+ "InterfaceSubclass: " + selectedUsbIf.getInterfaceSubclass() + "\n"
+ "EndpointCount: " + selectedUsbIf.getEndpointCount();

textInfoInterface.setText(sUsbIf);
checkUsbInterface(selectedUsbIf);
}

@Override
public void onNothingSelected(AdapterView<?> parent) {}

};

private void checkUsbInterface(UsbInterface uif) {
listEndPoint = new ArrayList<String>();
listUsbEndpoint = new ArrayList<UsbEndpoint>();

for(int i=0; i<uif.getEndpointCount(); i++){
UsbEndpoint usbEndpoint = uif.getEndpoint(i);
listEndPoint.add(usbEndpoint.toString());
listUsbEndpoint.add(usbEndpoint);
}

adapterEndpoint = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, listEndPoint);
adapterEndpoint.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spEndPoint.setAdapter(adapterEndpoint);
spEndPoint.setOnItemSelectedListener(endpointOnItemSelectedListener);
}

OnItemSelectedListener endpointOnItemSelectedListener =
new OnItemSelectedListener(){

@Override
public void onItemSelected(AdapterView<?> parent,
View view, int position, long id) {

UsbEndpoint selectedEndpoint = listUsbEndpoint.get(position);

String sEndpoint = "\n" + selectedEndpoint.toString() + "\n"
+ translateEndpointType(selectedEndpoint.getType());

textEndPoint.setText(sEndpoint);
}

@Override
public void onNothingSelected(AdapterView<?> parent) {}

};

private String translateEndpointType(int type){
switch(type){
case UsbConstants.USB_ENDPOINT_XFER_CONTROL:
return "USB_ENDPOINT_XFER_CONTROL (endpoint zero)";
case UsbConstants.USB_ENDPOINT_XFER_ISOC:
return "USB_ENDPOINT_XFER_ISOC (isochronous endpoint)";
case UsbConstants.USB_ENDPOINT_XFER_BULK :
return "USB_ENDPOINT_XFER_BULK (bulk endpoint)";
case UsbConstants.USB_ENDPOINT_XFER_INT:
return "USB_ENDPOINT_XFER_INT (interrupt endpoint)";
default:
return "unknown";
}
}

private String translateDeviceClass(int deviceClass){
switch(deviceClass){
case UsbConstants.USB_CLASS_APP_SPEC:
return "Application specific USB class";
case UsbConstants.USB_CLASS_AUDIO:
return "USB class for audio devices";
case UsbConstants.USB_CLASS_CDC_DATA:
return "USB class for CDC devices (communications device class)";
case UsbConstants.USB_CLASS_COMM:
return "USB class for communication devices";
case UsbConstants.USB_CLASS_CONTENT_SEC:
return "USB class for content security devices";
case UsbConstants.USB_CLASS_CSCID:
return "USB class for content smart card devices";
case UsbConstants.USB_CLASS_HID:
return "USB class for human interface devices (for example, mice and keyboards)";
case UsbConstants.USB_CLASS_HUB:
return "USB class for USB hubs";
case UsbConstants.USB_CLASS_MASS_STORAGE:
return "USB class for mass storage devices";
case UsbConstants.USB_CLASS_MISC:
return "USB class for wireless miscellaneous devices";
case UsbConstants.USB_CLASS_PER_INTERFACE:
return "USB class indicating that the class is determined on a per-interface basis";
case UsbConstants.USB_CLASS_PHYSICA:
return "USB class for physical devices";
case UsbConstants.USB_CLASS_PRINTER:
return "USB class for printers";
case UsbConstants.USB_CLASS_STILL_IMAGE:
return "USB class for still image devices (digital cameras)";
case UsbConstants.USB_CLASS_VENDOR_SPEC:
return "Vendor specific USB class";
case UsbConstants.USB_CLASS_VIDEO:
return "USB class for video devices";
case UsbConstants.USB_CLASS_WIRELESS_CONTROLLER:
return "USB class for wireless controller devices";
default: return "Unknown USB class!";

}
}

}

Layout, activity_main.xml
<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:orientation="vertical"
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: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" />

<Button
android:id="@+id/check"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Check USB devices" />

<Spinner
android:id="@+id/spinnerdevicename"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<Spinner
android:id="@+id/spinnerinterface"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<Spinner
android:id="@+id/spinnerendpoint"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

<TextView
android:id="@+id/info"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/infointerface"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="italic" />

<TextView
android:id="@+id/infoendpoint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="bold" />

</LinearLayout>
</ScrollView>

</LinearLayout>

In the demo video, the Android device is connected to PC in beginning; it show one UsbDevice only. Then connect with a Arduino Esplora board with USB OTG cable; it show two UsbDevice connected.


download filesDownload the files.

Next:
Read iManufacturer and iProduct of USB Device from raw Device Descriptors



Step-by-step: Android USB Host Mode programming




Baca Selengkapnya ....

A fast Android Emulator, Genymotion

Posted by Unknown Kamis, 30 Januari 2014 0 komentar
Genymotion is the next generation of the AndroVM open source project, already trusted by 450,000 developers.

It’s even easier to use and has lots more functionalities. To know more: http://www.genymotion.com/




Baca Selengkapnya ....

Lenovo to acquire Motorola Mobility

Posted by Unknown Rabu, 29 Januari 2014 0 komentar
Just announced at Google Official Blog:

We’ve just signed an agreement to sell Motorola to Lenovo for $2.91 billion. As this is an important move for Android users everywhere, I wanted to explain why in detail. ~ read more: http://googleblog.blogspot.hk/2014/01/lenovo-to-acquire-motorola-mobility.html





Baca Selengkapnya ....

Android Community Group@ARM Connected Commuity

Posted by Unknown 0 komentar
Android Community Group
Android is a robust software stack that includes an operating system, middleware and select applications. If you are developing Android apps or devices for mobile phones, tablets, etc., here (http://community.arm.com/groups/android-community) is where you'll find the latest ARM technology including Android porting guides, reference platform information and Linux kernel information including partnership with Linaro. You'll also find useful information on Mali, graphics IP and some of ARM Android porting service partners.



Baca Selengkapnya ....

Build native mobile applications using HTML, CSS and JavaScript

Posted by Unknown 0 komentar
Google introduce early developer preview of a toolchain to build native mobile apps using HTML, CSS and JavaScript. The toolchain based on Apache Cordova, an open-source mobile development framework.



The toolchain wraps your Chrome App with a native application shell and enables you to distribute your app via Google Play and the Apple App Store. We provide a simple developer workflow for packaging a Chrome App natively for mobile platforms. You can run your Chrome App on a device or emulator using the command-line or an IDE. Alternatively, you can use the Chrome Apps Developer Tool to run your app on an Android device without the need to install an IDE or the mobile platform’s SDK.

Soure: Chromium Blog: Run Chrome Apps on mobile using Apache Cordova







Baca Selengkapnya ....

Programming Google Glass

Posted by Unknown Selasa, 28 Januari 2014 0 komentar
Google Glass is the new wearable computer everyone's talking about. It offers a head-mounted optical display and touch interface, and it's programmable. Kick-start your Glassware development by exploring how users can interface with Glass, developing a Glass application fast by using the Mirror API to manipulate Timeline cards and menus, tracking a Glass's geolocation, creating rich interactions by responding to user inputs, and capturing or serving user images and videos. This is the book to read for a shortcut to this brave new world.

Google Glass is the next big thing in portable technology---a wearable computer with an optical head-mounted display. Programming Google Glass is your all-inclusive guidebook for crafting your own Glassware using the Mirror API.

You'll start by setting up a production-ready service using Google App Engine, then provide Glass users an authorization to your Glassware. You'll learn how to handle the provided credentials, and from there you'll dive into the parts that make up the Glass interface, managing the timeline and creating cards and menu items. Next you'll create services where the user can interact with your server, such as geolocation tracking, change notifications, and custom menu options. You'll use this information to create a sophisticated application that suggests local restaurants. You'll see how to attach or detach assets, images, and video, and learn the basics of the emerging field of optical-display design. You'll see how to properly design new Glassware and update existing applications to become Glassware.

Now is the best time to be an early adopter of a technology that will only become more advanced, nuanced, and ubiquitous.

What You Need:

You will need a Google Glass device and Java 1.6 or greater. An Android device, like a smart phone or tablet, is also helpful, but not necessary.




Baca Selengkapnya ....

[APK] LG G2 Stock Keyboard - Ported

Posted by Unknown 0 komentar
LG G2 is currently one of the most powerful and most equipped devices with he nice design and stuff. The supersstructure of this device looks also very cool - the lockscreen, homescreen, widgets and keyboard, which has been ported and it's now available on all devices!

LG G2 keyboard is well-known by its themes and customization, check out some for more info:

LG-G2-Stock-Keyboard-Themes

Like them? You can now get them without root access thanks to XDA member gerardroid with all its features!

LG-G2-Stock-Keyboard-Settings

The whole app can be downloaded HERE and can also be installed in usual way.
However, if your device is rooted, you can get some extra features - 5th row, split keyboard, emoji and more.

These functions can be enabled in build.prop navigated in /system using root browser. To enable these features, download the app (version for rooted devices) and  simply add these lines after the text (do not delete the previous text in build.prop):


  • ime_extend_row_keyboard=true
  • ime_onehand_keyboard=true
  • ime_split_keyboard=true
  • ime_vibration_pattern=0:20
  • ro.config.libemoji=libemoji_lge.so
  • ro.lge.capp_emoji=true

Then save the build.prop and finally reboot your device to take the effect.
Do not try to modify your build.prop file without having a nandroid backup - if a problem appears, you may be stuck in bootloop and brick your device without a return!






Baca Selengkapnya ....

Application Development with Qt Creator

Posted by Unknown Senin, 27 Januari 2014 0 komentar
Application Development with Qt Creator

A fast-paced guide for building cross-platform applications using Qt and Qt Quick
Overview
  • Introduces the basic concepts of programming using Qt and the Qt Quick framework, with tips and tricks to help you make the most of Qt Creator
  • Shows you how to write cross-platform mobile applications with Qt Creator
  • Full of illustrations and diagrams, with clear step-by-step instructions and practical examples that will help you build cross-platform applications using Qt and Qt Quick
In Detail
Qt Creator is the leading open-source, cross-platform integrated development environment (IDE) for building GUI applications that run on Windows, Mac OS X, Linux, Android, and many embedded systems. It greatly simplifies cross-platform application development, targeting desktop computers, embedded platforms, and mobile systems. If you want to build and debug applications with Qt Creator in no time, then this book is for you.
This book provides a thorough introduction to using Qt Creator to make cross-platform applications that you can read in just a few hours. It covers everything you need to know to build applications with Qt Creator. This book also discusses the facets of Qt Creator that make it a valued software development environment for students and professionals alike.
The book starts by showing you how to get, install, and use Qt Creator, beginning with the basics of how to edit, compile, debug, and run applications. Along the way, you will learn to use Qt to write cross-platform GUI applications for Mac OS X, Windows, Linux, and Android in C++ and Qt Quick.
This book covers how to craft GUIs with Qt Designer, localize applications using Qt Linguist, and profile application performance with Qt Creator's tools and valgrind. You will gain valuable insight in constructing applications using Qt in C++ and Qt Quick, Qt's declarative GUI authoring platform and learn everything you need to know to use Qt Creator effectively as a software developer.
What you will learn from this book
  • Use Qt Creator's editor to edit your application source and resource files
  • Localize applications using Qt Linguist and Qt
  • Design GUI applications using both Qt and Qt Quick
  • Write mobile applications for Android using Qt Creator and Qt Quick
  • Integrate version control with Qt Creator
  • Gain valuable tips known only to professional developers
Approach
Written in a concise and easy-to-follow approach, this book will guide you to develop your first application with Qt with illustrated examples and screenshots
Who this book is written for
If you are a developer who is new to Qt and Qt Creator and is interested in harnessing the power of Qt for cross-platform development, this book is great for you. If you have basic experience programming in C++, you have what it takes to create great cross-platform applications using Qt and Qt Creator!



Baca Selengkapnya ....

Developing Android on Android: Automate Your Device with Scripts and Tasks

Posted by Unknown 0 komentar
Developing Android on Android: Automate Your Device with Scripts and Tasks

Take advantage of the open, tinker-friendly Android platform and make your device work the way you want it to. Quickly create Android tasks, scripts, and programs entirely on your Android device--no PC required. Learn how to build your own innovative Android programs and workflows with tools you can run on Android itself, and tailor the Android default user interface to match your mobile lifestyle needs. Apply your favorite scripting language to rapidly develop programs that speak the time and battery level, alert you to important events or locations, read your new email to you, and much more.

Take charge of your Android phone or tablet by creating your own programs and scripts to make your device work for you. Developing Android on Android will teach you how to use the latest cutting-edge technologies to tailor your Android experience to your mobile lifestyle.

Write scripts that listen to your voice and post spoken tweets on Twitter. Track your phone's status and have it report its location every ten minutes via an instant message. Query and listen to weather forecasts with the click of a headset button. Have system notifications and new SMS messages automatically read to you. Design your own application launcher with a look and behavior that can be dynamically modified depending on the scripts and applications you execute.

With step-by-step instructions throughout, you'll master how to develop your own custom applications. And because you'll be using programming tools on your Android, you can change and improve your programs at any time. You'll build new Android programs and task-driven on-board workflows faster than any traditional Android development environment could hope to match!

What You Need

An Android smartphone or tablet running Android 4.0 or higher.





Baca Selengkapnya ....

Xperia Z Keyboard Ported For All Android Devices

Posted by Unknown 1 komentar
Another leak from the famous Sony device Xperia Z brings up an awesome stylish keyboard with all the original features - 3 themes, awesome words prediction, cool swype feature, multilanguage, customizable layout and more! Now you can get this app also on ICS!

The app is stable and should not make any problems on ICS/JB ROMs. The installation procedure is usual: flash the ZIP in recovery mode.





Downloads

Don't forget to make a backup before flashing!

If the for some reason the CWM zip didn't work for you or the Keyboard doesn't appear in settings do this:

  •  Decompress the zip file. 
  •  Ignore the META-INF folder
  •  In the app folder, you'll find textinput-chn.apk (Mandarin Chinese keyboard) and textinput-tng.apk (English keyboard).
  •  You can move one or both into /system/app folder with ES File Manager/root explorer/etc. (or adb)
  •  Move lib/libXT9Engine into /system/lib
  •  Move usr/xt9 into /system/usr
  •  Reboot. If you still don't see the keyboard in your settings, install the apk with your file manager which should work with the libraries installed.


Baca Selengkapnya ....

Interactive resizable PopupWindow

Posted by Unknown Sabtu, 25 Januari 2014 0 komentar
This example show how to implement OnTouchListener for PopupWindow to make it resizable inactively.

Interactive resizable PopupWindow
Interactive resizable PopupWindow

package com.example.androidpopupwindow;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.PopupWindow;
import android.widget.Spinner;
import android.app.Activity;

public class MainActivity extends Activity {

String[] DayOfWeek = {"Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"};

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

final Button btnOpenPopup = (Button) findViewById(R.id.openpopup);
btnOpenPopup.setOnClickListener(new Button.OnClickListener() {

@Override
public void onClick(View arg0) {
LayoutInflater layoutInflater =
(LayoutInflater)getBaseContext()
.getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.popup, null);
final PopupWindow popupWindow = new PopupWindow(
popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

Button btnDismiss = (Button)popupView.findViewById(R.id.dismiss);

Spinner popupSpinner = (Spinner)popupView.findViewById(R.id.popupspinner);

ArrayAdapter<String> adapter =
new ArrayAdapter<String>(MainActivity.this,
android.R.layout.simple_spinner_item, DayOfWeek);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
popupSpinner.setAdapter(adapter);

btnDismiss.setOnClickListener(new Button.OnClickListener(){

@Override
public void onClick(View v) {
popupWindow.dismiss();
}});

popupWindow.showAsDropDown(btnOpenPopup, 50, -30);

popupView.setOnTouchListener(new OnTouchListener() {
int orgX, orgY;
int offsetX, offsetY;

int orgWidth, orgHeight;

@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
orgX = (int) event.getRawX();
orgY = (int) event.getRawY();

orgWidth = v.getMeasuredWidth();
orgHeight = v.getMeasuredHeight();

break;
case MotionEvent.ACTION_MOVE:
offsetX = (int)event.getRawX() - orgX;
offsetY = (int)event.getRawY() - orgY;

//resize PopWindow
popupWindow.update(
orgWidth + offsetX,
orgHeight + offsetY);
break;
}
return true;
}});
}

});
}

}

For other files, such as layout, customborder.xml...etc, refer to last exercise "PopupWindow with transparent background" and "Create background of Popup Window with custom shape".

download filesDownload the files.


Related: Implement drag-and-drop movable PopupWindow




Baca Selengkapnya ....

Molang Haul from Official Retailer~~

Posted by Unknown 0 komentar
Finally working on my Molang collection <3 I might have a slight addiction to this puffy little rabbit~
Luckily, this cute mascot is gaining popularity around the world so it's getting easier to find him abroad.

Due to the demand for international shipping for items from the official Molang online shop [here],
They opened an official eBay store that has international shipping [eBay shop], which is great news for those out of Korea.

The eBay shop lists new items every other week and sells all the items, depending on availability, carried on their normal shop~
Shipping ranges from $7 USD to $25 USD, which is pretty affordable.

My items came in two packages, one priced at $25, which was the necklace and the rest all together for $20 shipping in total. Shipping is decent and takes 5-20 days to receive your parcel depending where you live.


 With my package I received a free Molang fan and a set of 3D Molang stickers.

The most expensive item in their shop is the Molang and Nano+o Meter necklace. Which is slightly over $100 USD.
It's made of Silver 92.5%,red copper etc 7.5%,Rhodium Plating and is hand crafted.
The necklace is roughly the size of my pinky nail bed and comes on a silver chain.

It should be noted that I have a sever metal allergy when it comes to items that aren't silver or gold and I've been wearing the necklace for almost a month now without removing it and I show no signs of irritation. So I can attest that the item is very pure.

The necklace looks very delicate and lies just right under my collar bone and does a beautiful job of accentuating my neck and is a great universal accessory for all my outfits.
I debated for awhile if the necklace was worth splurging on and after putting it on, I have no regrets on getting it for myself.
The next item I ordered was the Molang neck pillow. It's very well crafted, very soft but firm enough to nicely support my head and neck comfortably.

It's so very cute and an item I use quite often, especially when I'm in bed reading.

 The last Molang merchandise I purchased was the Molang cloak/house blanket.
It's a decent sized blanket, it's roughly 80cm long from top to bottom and has a plush hook that closes the cloak around your shoulders. It's very comfortable, warm and secure~ Perfect for the cool nights we've been having recently.
 The cloak even has a cute tail on the back and mittens for your hands to keep snug. Which, for some reason, I forgot to take pictures of;;

 Details of the beautiful stitching/details.
Also, you can roll up the blanket and tuck it into the hood for storage and it looks super cute, like a plush~

I'm so glad that Molang is becoming popular and is more readily available to an international audience. All the items of Molang I have are great quality and are a joy to own.

I hope you enjoyed the information and a peek at my haul.
I'm starting to live up to my given nickname, 'Molang Princess'~

<3CarisseIris

Baca Selengkapnya ....

[WALKTHROUGH] How To Undervolt Your Android Device Safely?

Posted by Unknown Jumat, 24 Januari 2014 0 komentar
Changing the CPU voltage. What is it? Is it safe? Useful? How do I undervolt my Android device? You'll find the right answers right in this posts. Needless to say, undervolting your Android is extremly useful, though it requires very high responsibility and precaution because if you screw up the voltages, you can wave goodbye to your device.

So, what are the benefits of undervolting your Android device? Well, undervolting can save you much more battery, may increase performance and your device will stop overheating! And how to do such this thing?
Follow the walkthrough cautiously:


Before doing anything, ensure your kernel supports volting and you're rooted.
Please read the entire walkthrough just before you start.

  1. Firstly, download the voltage control app (HERE or HERE)
  2. You can see various voltages to certain frequencies (for example: 1000Mhz to 1250mV)
  3. As you might expect, to undervolt your device you need to lower the mV value
  4. Start slowly by lowering each frequency (Mhz) down by 25mV. (From 1250mV down to 1225mV).
  5. Proceed lower and lower..
As you keep continuing with undervolting your device, it will shut-down. Don't be worried. This procces is called the sleep of death (SOD), where the CPU has no more power to keep your device awake.
You can reboot your device by removing the battery (and putting it back, obviously) or hold the power button for a while.

The thing is, you need to remember the critical values (when the phone is capable of normal work and is not in SOD). To do this, you gotta need a paper with a pen and carefully watch the values just before your device shuts down.

If you're too lazy to do this, you can watch for the list of values tested by users. Always search the list for your device only.


Never check "set on reboot" option when testing the voltages, otherwise your phone will never boot back up!




If you don't want to undervolt your phone as much as possible, you don't have to. Just lower the voltage -50mV. Don't try to higher the voltage, it may boost the performance a bit, but causes an extreme damage to your battery - overcharge leads to the synthesis of cobalt oxide, which will permanently damage your battery.


If you have any question regarding this topic, drop a line down to comments.

Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android gingerbread.