Day9


Time : October 30th,2015 / Author : xiaomeixw

library

1.UI:

  • FlippableStackView --- (From blipinsk) : An Android library introducing a stack of Views with the first item being flippable. [显示view堆栈效果的库].

  • PhotoView --- (From chrisbanes) : Implementation of ImageView for Android that supports zooming, by various touch gestures. [图片手势控件、缩放,老牌优质控件].

  • PinchImageView --- (From boycy815) : An Android library introducing Picture gesture control like photoview supports zooming, can use with viewpager. [图片手势控制、缩放].

  • subsampling-scale-image-view --- (From davemorrissey) : Highly configurable, easily extendable view with pan and zoom gestures for displaying huge images without loss of detail. Perfect for photo galleries, maps, building plans etc. [缩放和显示大图(加载超1MB大图片)的Android类库].

2.Logic:

  • fragmentargs --- (From sockeqwe & Tag is Annotation) : Annotation Processor for setting arguments in android fragments. [编译时注解,用于activity和Fragment的参数传值].

      //Fragment:
      public class MyFragment extends Fragment {
    
          @Arg
          int id;    
          @Arg
          String title;
    
          @Override
          public void onCreate(Bundle savedInstanceState){
              super.onCreate(savedInstanceState);
              FragmentArgs.inject(this); // read @Arg fields
          }
    
          @Override
          public View onCreateView(LayoutInflater inflater, 
              ViewGroup container, Bundle savedInstanceState) {    
                  Toast.makeText(getActivity(), "Hello " + title, 
                      Toast.LENGTH_SHORT).show();        
                  return null;
            }        
      }
    
      //Activity:
      public class MyActivity extends Activity {
          public void onCreate(Bundle savedInstanceState){
              super.onCreate(savedInstanceState);    
              int id = 123;
              String title = "test";    
              // Using the generated Builder
              Fragment fragment = 
                  new MyFragmentBuilder(id, title)
                  .build();    
    
              // Fragment Transaction
              getFragmentManager()
                  .beginTransaction()
                  .replace(R.id.container, fragment)
                  .commit();        
          }    
      }
    

    Want to know more see Tomorrow's article.

  • auto --- (From google & Tag is APT) : A collection of source code generators for Java. [google出品的Java 源代码生成器集合].

    • AutoFactory - JSR-330-compatible factories.(兼容 JSR-330 的工厂)

    • AutoService - Provider-configuration files for ServiceLoader(ServiceLoader 的 Provider-configuration 文件)

    • AutoValue - Immutable value-type code generation for Java 1.6+.(Java 1.6+ 的不可变 value-type 代码生成)

    • Common - Helper utilities for writing annotation processors.(Helper 实用工具,用来编写注释处理器)

E.g:AutoService will generate the file META-INF/services/javax.annotation.processing.Processor in the output classes folder. 

    @AutoService(Processor.class) 
    public class FactoryProcessor extends AbstractProcessor {
            ...
    }    
  • GAlette --- (From uPhyca & Tag is Annotation) : Annotation-triggered tracking along with Google Analytics for Android. [编译时注解,结合Google Analytics追踪统计].

      //Application:
      public class MyApplication extends Application implements TrackerProvider {    
          private Tracker mTracker;        
          @Override
          public void onCreate() {
              super.onCreate();
              GoogleAnalytics ga = GoogleAnalytics.getInstance(this);
              mTracker = ga.newTracker(R.xml.your_tracker_resource);
          }    
          @Override
          public Tracker getByName(String trackerName) {
              return mTracker;
          }
      }
    
      //track appView:@SendScreenView
      public class MainActivity extends Activity {
          @Override
          @SendScreenView(screenName = "main")
          protected void onCreate(Bundle savedInstanceState) {
              ...
          }
      }    
    
      //track event:@SendEvent
      public class MainActivity extends Activity {
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              ...    
              findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
                  @Override
                  @SendEvent(category = "button", action = "click")
                  public void onClick(View v) {
                      onButtonClicked();
                  }
              });
          }    
      }    
    

3.Architecture:

  • cube-sdk --- (From liaohuqiu A Developer from China) : A light package for Android development, it handles loading image and network request. [一套图片网络请求的框架].

    Want See more imformation check this website

    DEMO project has been moved to HERE.

  • android-flux-todo-app --- (From lgvalle) : Example of how to implement an Android TODO App using Facebook Flux Architecture. [在android上探索Flux架构].

    There are two key features to understand Flux:

    • The data flow is always unidirectional.

      An [unidirectional data flow][unidirectional] is the core of the Flux architecture and is what makes it so easy to learn. It also provides great advantages when testing the application as discussed below.

    • The application is divided into three main parts:

      • View: Application interface. It create actions in response to user interactions.
      • Dispatcher: Central hub through which pass all actions and whose responsibility is to make them arrive to every Store.
      • Store: Maintain the state for a particular application domain. They respond to actions according to current state, execute business logic and emit a change event when they are done. This event is used by the view to update its interface.

      This three parts communicate through Actions: Simple plain objects, identified by a type, containing the data related to that action.

      Want See more imformation check today's article.

article

  • flux-architecture --- (From Author lgvalle blog http://lgvalle.xyz/) --- [Source in Github]

    Finding a good architecture for Android applications is not easy. Google seems to not care much about it, so there is no official recommendation on patterns beyond Activities lifecycle management.

    But defining an architecture for your application is important. Like it or not, every application is going to have an architecture. So you'd better be the one defining it than let it just emerge. [Translation:探索Facebook的Web-Flux 架构在android上的尝试].

    Chinese Translation Address : Thanks To android-tech-frontier

    Introducing Flux Architecture:

    Stores:

    Network requests and asynchronous calls:

App-Demo

  • plaid --- (From nickbutcher Design news and inspiration) : Plaid is a showcase of material design that we hope you will keep installed. It pulls in news & inspiration from Designer News, Dribbble & Product Hunt. [带Material Design设计风格的App-Demo,从Designer News, Dribbble 以及 Product Hunt中获取内容].

    Check the Source in Github.Want to know more about the App-Demo see GooglePlay

website

  • http://www.8thlight.com --- :Every Friday at noon, 8th Light hosts a lunch and talk on various software topics. Talks are given by 8th Light craftsmen or the occasional guest speaker, and they can range from discussions to hands-on exercises. All talks are recorded and available online. [一个轻量级的Blog].

results matching ""

    No results matching ""