MasterofProject

Sogou Android database ORM framework: GreenDao in the use of AndroidStudio

The first two projects are used in the GreenDao framework (open source address: [https://github.com/greenrobot/greenDAO] (https://github.com/greenrobot/greenDAO)) as a framework for the operation of our database, I think it is good to use. But before has been using the Eclipse project, and now we have developed the project has all with AndroidStudio as a development tool, how to use GreenDa in AndroidStudio...
read(100) comment(0)

JAVA design pattern: combination mode

Combination model of (the relationship between whole and part): will be different but related combinatorial objects into tree structure to achieve the "part whole hierarchies and allows the user to individual objects and compositions of objects uniformly. * pattern role composition: * 1.Component object: the object interface in the combination is the common interface of all classes. Is used to define the integral part of the whole. 2.Leaf object: part of the whole, there is no next level. 3.Composite object: used to store the sub components, in the Componen...
read(191) comment(0)

JAVA design patterns: memo mode

Memo mode: also called snapshot mode, which means that the internal state of an object is obtained without damaging the encapsulation, and the state is recorded and stored outside of the object. When there is a need, the object can be restored to the original state of preservation. We are equivalent to the object of the original backup to retain, so called memo mode. * pattern role object composition: 1. The initiator object: responsible for creating a memo to record the internal state of the object and use the memo to restore the internal state. 2 memorandum object: responsible for the storage of initiator of the internal state of the object, and prevent other object access memo. ...
read(162) comment(0)

The JAVA design pattern: the builder pattern

Builder pattern: the complex object structure and its realization of phase separation, let the same build process can create different objects. Suitable occasion: An algorithm for a complex object should be independent of the component part of the object or when the construction procedure allows different objects to be constructed. Composition role: 1 creator (Builder) interface: specify the abstract interface to the corresponding parts of an object. 2 concrete creator (ConcreteBuilder): Builder interface to achieve the various components of the object. 3 specific management objects (Dire...
read(312) comment(0)

JAVA design pattern: command mode

Typically, the behavior of the request and the implementation usually presents a highly coupled state. Sometimes it is not appropriate to change the behavior of the process, the highly coupled mode is not suitable. * the behavior of the request and the behavior of decoupling, a set of behavioral abstractions as the object, the realization of the loose coupling between the two. This is the command mode (Pattern Command). Command mode is usually composed of several parts: the command interface, the specific commands (to achieve the command interface), to accept the command of the image, such as the command controller. * mode advantage: 1 to reduce the object between...
read(179) comment(2)

JAVA design patterns: Visitor patterns

Visitor mode: The operation of each element in an object structure allows you to add a new operation to these elements without changing the data structures of the various elements. Structural object is a necessary condition for visitor mode, and the structure object must exist a method to traverse its own individual objects. Applicable to: the data structure is relatively stable, the data structure and the role of its other operations, so that the operation is relatively free. advantage 1, in accordance with the principle of a single responsibility 2, good scalability: the elements of the class can be accepted by different visitors to achieve the expansion of different operations. Disadvantages: 1, if...
read(185) comment(0)

Android development in the Samsung mobile phone camera exception handling

Today in the development of the time, encountered a more serious BUG. Is to upload pictures in the program features in the call to take pictures of the phone, the other mobile phone is no problem. Only Samsung mobile phone (N9008s) camera when the program directly crashes. Samsung mobile phone and other mobile phone camera when the only difference is the Samsung mobile phone in the camera, mobile phone screen will switch. Dubug program found that Samsung mobile phones in the camera, the data returned in the onactivityresult method is null, thought may be caused by mobile phone screen anyway affect the life cycle of activity, think of an...
read(21) comment(0)

Android network loading framework: Picasso brief introduction

Has not used the Picasso image to load the framework, today with the next, very easy to use, simple to write a note! * Android network loading framework: Picasso, open source address: http://square.github.io/picasso/ * the framework is developed by Square Android for the development of a set of graphics cache framework to achieve the picture download and cache function * merit: * can load local and network pictures * to facilitate the realization of image transformation operations, such as the size of the change...
read(195) comment(2)

Android Development Notes image cache gestures and OOM analysis

The original turn from: http://www.it165.net/pro/html/201601/59439.html# Image cache, gestures and oom three themes together, is because in Android application development process, these three problems are often linked together. First, the preview to enlarge need support to zoom gesture, rotation, translation and other operations; secondly, the picture when you need a local cache, avoid frequent access to the network; finally, the picture (bitmap) is Android in memory of large, involving larger HD, etc....
read(31) comment(0)

Sogou Android network image loading framework: Universal-ImageLoader introduction

Network image loading framework: Universal-ImageLoader GitHub open source address: https://github.com/nostra13/Android-Universal-Image-Loader characteristic Support local images, web images, multi thread asynchronous loading and caching Load images according to their own project personalized configuration ImageLoader Image loading process listening, you can pause the picture to load, reload, etc. Automatic processing of pictures according to the current memory situation, to prevent...
read(24) comment(0)

Android network request framework: Android-async-http simple to use

Android-async-http network framework: https://github.com/loopj/android-async-http * is an efficient data request, the file upload and download network request open source framework. * merit: * network request callback clear, easy to operate * request the use of the thread pool TreadPool, limiting the use of concurrent requests for resources * POST, GET and other commonly used request based on the parameters to build the use of convenient transfer parameters * Multipar...
read(120) comment(0)

Android network request framework: Volley simple to use

Volley framework: the 2013 I/O Google conference, Volley released. Google is the official Volley issued on the shore with the Android platform for network communications, the purpose is to make the network communications faster, easier and more robust. characteristic Network communications faster, simpler and more robust Get, POST and other commonly used network requests and image efficient asynchronous processing Multiple network requests can be prioritized, you can cancel the request operation Cache processing for network requests Can interact with the Activity life cycle...
read(28) comment(0)

Andrews study notes: ImageView picture to achieve a double click to enlarge and narrow

Last night to see the screen, the picture of learning to bloom knowledge, make a note, maybe next time will be able to directly use the custom of a blooming picture of the ImageView, as the control can be used. Android.content.Context import; Android.graphics.Matrix import; Android.graphics.RectF import; Android.graphics.drawable.Drawab import...
read(105) comment(0)

JAVA design patterns: the observer pattern

Observer pattern: a pair of multiple dependencies between objects, so that a number of observer objects while listening to a subject object (observation). In order to change the state of an object, all the objects that depend on it are notified and the corresponding changes occur. There are a lot of ways to implement the observer pattern: the model must include the two roles of the observer and the observed object. There is a logical relationship between the observer and the observed. When the observer is changed, the observer will observe the change and make the corresponding change. / * * Viewer interface: observer...
read(172) comment(0)

AndroidStudio project export third party libray package as a dependency Library

These days when doing the project, the team of colleagues in order to facilitate the development of new features, to our AndroidStudio project add the a dependent library and colleagues when submitted to the SVN code, because of the arrangement of the submitted to the block of code management, not the.Gradle documents submitted, cause I when updating the project, project error. Because beginning with AndroidStudio as a development tool also soon, so all of a sudden don't know where to start, toss for nearly an hour, to find their own way + Baidu, and now finally straightened out. In fact, just need to be very simple...
read(31) comment(0)
    personal data
    • visit48131 times
    • Integral:Two thousand two hundred and twenty-three
    • Grade
    • Rank:10236th name
    • original180
    • Reproduced:37
    • Translation:1
    • Comments:13
    Latest comments