Gesture recognition = Read Phone contact =contentresolver-day3

Source: Internet
Author: User

Gesture recognition = Read Phone contact =contentresolverday32 mobile3.0
    1. Phone Setup Wizard page 完成
    2. Selector does not do 完成
    3. Style Extraction 完成
    4. Optimization 继续 of custom controls
    5. Extracting a parent class Activity 完成
    6. The phone reads the contact person.
Problem stack
    1. Custom controls in-depth understanding of customizations ListView
    2. It's time to study the framework and design XUtils 4 modules
    3. Look into the window over-animation tomorrow.
4. Gesture Control GestureDetector

Gesture in the Activity inside there is a onTouchEvent(MotionEvent event) method, the parameter is the user on the screen above the role of the base, MOtionEvent encapsulated a lot of gesture definition method, we define GenntureDetector , listen to SimpleOnGestureListener the listener in the onFing(....) sliding method, the specific implementation of the following

//When the activity was created
@Override
protected void onCreate(Bundle savedinstancestate)
{
Super. OnCreate (Savedinstancestate);
Context = This;
Requestwindowfeature (Window.feature_no_title);
//Create a gesture recognizer
Mgesturedetector =NewGesturedetector ( This,NewSimpleongesturelistener ()
{
/*
* E1 represents the first touch event, E2 represents the velocity of the event x horizontal direction when the toilet paper leaves, indicating the speed of the beam value direction
*/
@Override
Public boolean onfling(motionevent E1, motionevent E2, float Velocityx, float velocityy)
{
//If the listener successfully returns TRUE, the listener fails to return false;
if(Math.Abs (Velocityx) < -)
{
//PIS/S indicates that the speed across the unit time is too slow
Toastutil.show (Context,"Next page please swipe a bit faster");
return true;
}
if(E1.GETRAWX ()-e2.getrawx () > $)
{
Shownext ();
Overridependingtransition (r.anim.tran_in, r.anim.tran_out);
return true;
}
if(E2.GETRAWX ()-e1.getrawx () > $)
{
Showpre ();
Overridependingtransition (R.anim.tran_in_pre, R.anim.tran_out_pre);
return true;
}

return Super. onfling (E1, E2, Velocityx, Velocityy);
}

//long-press monitoring
@Override
Public void onlongpress(motionevent e)
{
NewAlertdialog.builder (context). SetIcon (R.drawable.btn_check_off)
. Settitle ("You've pressed my screen."). Setmessage ("I'd love to know what you're trying to do!" "). Create (). Show ();
}
});
}

@Override
Public boolean ontouchevent(motionevent event)
{
Mgesturedetector.ontouchevent (event);
//TODO auto-generated method stub
return Super. Ontouchevent (event);
}
    1. Animation design
    2. Broadcast receiver Review
    3. ViewPage, Pargment optimization 完成一半 . Keep the information in the evening

      ViewPageis a V4 package inside of a control, how to better and Pargment use a period of time in the study, we will refuel in the evening to learn more.

    4. Video of the evening recording and transmitting wisdom

Custom controls in-depth understanding of customizations ListView ContentResolverClass

This class is primarily used by Android for data sharing, and an application can completely expose its own data, which is provided by this class. ,,, delete() insert() upDate query() the method. What is the principle? It's not quite understood yet.

Experience
    1. Deep must go a little deeper.
    2. Spend the morning on that day researching interface design
    3. Two People 1.0
    4. When you look at a blog, you must make your own summary notes. The efficiency will be high
Ready to design an app that sends blessing messages. Phone1.0

1. Read the name of the person you want to send. In front of the message will be home to the name of your saved phone. So you can pretend you're not a mass.

Gesture recognition = Read Phone contact =contentresolver-day3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.