2014년 1월 8일 수요일

Android View 관련된 오픈소스 정리


출처 : 
http://www.kmshack.kr/323

Android View와 관련된 오픈소스들이 많이 공개 되고 있다. 그래서 많이 쓰이고 유용한 오픈소스를 정리 해보았다.  아직 국내에서는 오픈소스가 인색한지 모두 외국에서 만든것들이다. 나도 View관련 오픈소스를 하나준비 하겠다고 준비중인데.. 준비중이기만 하다.

참고로, 잘 알려지고 검증된 오픈소스라도 코드를 하나하나씩 보고 어떻게 구현되어 있는지 꼭 살펴보고 썼으면 좋겠다. 그리고 이제 개발을 시작한지 얼마 안된 분들이라면 이런 오픈소스를 사용함으로 자기 실력을 죽일 수도 있으니 한번씩 구현해보는 것도 좋을듯 하다.

그리고 국내 개발 커뮤니티에 보면 자기가 개발할 것에 대해 오픈소스를 찾음으로써 개발해서 삽질 하기전에 찾아서 다행이다라는 글들을 보면 씁쓸하다. 오픈소스는 좋은점도 있지만 그에 반하는 양면성을 가지고 있다는 것에 조심했으면 좋겠다.


아무튼 아래것들은 이미 유명하고 잘만들어진 오픈소스들이다.



1. ActionbarSherlock
허니컴부터 적용된 액션바를 이전버전에도 사용할 수 있게 해준다.


ActionBarSherlock is an standalone library designed to facilitate the use of the action bar design pattern across all versions of Android through a single API.
The library will automatically use the native ActionBar implementation on Android 4.0 or later. For previous versions which do not include ActionBar, a custom action bar implementation based on the sources of Ice Cream Sandwich will automatically be wrapped around the layout. This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.



2. Android-PullToRefresh
ListView, ScrollView, Viewpager, WebView 등 새로고침 기능의 View를 만들어 준다.


This project aims to provide a reusable Pull to Refresh widget for Android. It was originally based on Johan Nilsson's library (mainly for graphics, strings and animations), but these have been replaced since.






3. StickyListHeaders
ListView의 Section Header 정보를 넣을 수 있다.


StickyListHeaders is an Android library that makes it easy to integrate section headers in your ListView. These section headers stick to the top like in the new People app of Android 4.0 Ice Cream Sandwich. This behavior is also found in lists with sections on iOS devices. This library can also be used for without the sticky functionality if you just want section headers.
StickyListHeaders actively supports android versions 2.3 (gingerbread) and above That said, it should be compatible with much older versions of android as well but these are not actively tested.
Here is a short gif showing the functionality you get with this library:



4. MenuDrawer
좌측 또는 우측의 슬라이드 메뉴를 구성 할 수 있다.

A slide-out menu implementation, which allows users to navigate between views in your app. Most commonly the menu is revealed by either dragging the edge of the screen, or clicking the 'up' button in the action bar.



5. SlidingMenu
MenuDrawer와 같다.


SlidingMenu is an Open Source Android library that allows developers to easily create applications with sliding menus like those made popular in the Google+, YouTube, and Facebook apps. Feel free to use it all you want in your Android apps provided that you cite this project and include the license in your app.]



6. FadingActionBar
리스트뷰 스크롤시 헤더 컨텐츠에 따라 액션바의 알파값이 변한다. 구글 음악플레이어의 아티스트정보 페이지


FadingActionBar is a library which implements the cool fading action bar effect that can be seen in the new Play Music app.




7. DragSortListView
리스트 소팅


DragSortListView (DSLV) is an extension of the Android ListView that enables drag-and-drop reordering of list items.



8. IndexableListView
리스트뷰의 알파벳 인덱스 기능




9. ListViewAnimations
ListView 스크롤시 애니메이션(구글 플러스)


ListViewAnimations is an Open Source Android library that allows developers to easily create ListViews with animations. Feel free to use it all you want in your Android apps provided that you cite this project and include the license in your app.



10. ViewPagerIndicator
ViewPager 인디케이터


Android-ViewPagerIndicator is presented as an Android library project. A standalone JAR is not possible due to the theming capabilities offered by the indicator widgets.


11. PagerSlidingTabStrip
ViewPager 인디케이터


Interactive paging indicator widget, compatible with the ViewPager from the Android Support Library.



12. JazzyViewPager
ViewPager 스크롤시 애니메이션


An easy to use ViewPager that adds an awesome set of custom swiping animations. Just change your ViewPagers to JazzyViewPagers and you're good to go!



14. ViewPager3D
ViewPager 스크롤시 3D 효과




15. DirectionalViewPager
ViewPager 좌우, 아래위 스크롤


Implementation of the compatibility library ViewPager class that supports paging both vertically and horizontally as well as changing between the two at runtime.



16. VerticalSeekBarAndroid
수직 SeekBar


This project is all about Customizing the normal SeekBar to Vertical Seekbar.



17. HoloCircleSeekBar
원형으로 생긴 SeekBar


A Circle SeekBar inspired by Android Holo ColorPicker designed by Marie Schweiz and developed by Lars Werkman.



18. MultiChoiceAdapter
ListView, GridView에서 다중선택을 쉽게 할 수 있도록 도와준다.


MultiChoiceAdapter is an implementation of ListAdapter which adds support for modal multiple choice selection as in the native Gmail app.





19. TwoWayGridView
GridView를 가로, 세로방향으로 스크롤 되도록 한다.


An Android GridView that can be configured to scroll horizontally or vertically.



20. ScrollBarPanel
스크롤바 옆에 View를 생성(Path 2.0에서 볼 수 있는 기능)


Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0.

Awesome Android Open Source


Core Libraries


ActionBarSerlock
ActionBarSherlock is an extension of the support library designed to facilitate the use of the action bar design pattern across all versions of Android with a single API.
Android Support Library
Includes Backwards Compatible: Fragments, Notifications, View Pager, Sliding Layout, Accessibility, Loaders

View PagerBackwards compatible view paging with customizable tabs.

NineOldAndroids
Android library for using the Honeycomb (Android 3.0) animation API on all versions of the platform back to 1.0! 

HoloEverywhere Bringing Holo Theme from Android 4.1 to 2.1 and above.

OttoAn enhanced Guava-based event bus with emphasis on Android support.
Otto is an event bus designed to decouple different parts of your application while still allowing them to communicate efficiently.

Downloaders


Android-Universal-Image-Loader
This project aims to provide a reusable instrument for asynchronous image loading, caching and displaying. It is originally based on Fedor Vlasov's project and has been vastly refactored and improved since then.


OkHttp
OkHttp is an HTTP client that’s efficient by default:
  • SPDY support allows all requests to the same host to share a socket.
  • Connection pooling reduces request latency (if SPDY isn’t available).
  • Transparent GZIP shrinks download sizes.
  • Response caching avoids the network completely for repeat requests.

Volley
Volley is a library that makes networking for Android apps easier and most importantly, faster.
Video Tutorial

Picasso
Images add much-needed context and visual flair to Android applications. Picasso allows for hassle-free image loading in your application—often in one line of code! 

UI


AndroidViews
Large collection of open source UI libraries organized nicely


App Rater
Allows your users to rate your application.
Shows a customizable rate dialog according to your chosen settings.


Asset Studio
Icon Generators 
  • Launcher icons
  • Action bar and tab icons
  • Notification icons
  • Navigation drawer indicator
  • Generic icons

Other Generators
  • Device frame generator
  • Simple nine-patch generator

Community Tools
  • Android Action Bar Style Generator
  • Android Holo Colors Generator

Graphics Packs
Collection of stencils and action bar icon that can be used in your app

New User Experience


Showcase View
The ShowcaseView library is designed to highlight and showcase specific parts of apps to the user with a distinctive and attractive overlay. This library is great for pointing out points of interest for users, gestures, or obscure but useful items.


ckChangeLog
This library provides an easy way to display a change log in your app.


Sliding Menus


https://github.com/jfeinstein10/SlidingMenu
http://developer.android.com/training/implementing-navigation/nav-drawer.html
https://github.com/SimonVT/android-menudrawer
https://github.com/eddieringle/android-undergarment

Data Processing


GSON
Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object.
Jackson
High-performance JSON processor.
Now also supports XML.
Good Tutorial

Parcelabler
Auto generates the parcelable implementation for a java class.
Very useful when you want to be able to pass an object in a bundle.

2009년 12월 10일 목요일

JSON( Javascript Object Notation )

JSON (JavaScript Object Notation)은 경량의 DATA-교환 형식이다. 이 형식은 사람이 읽고 쓰기에 용이하며, 기계가 분석하고 생성함에도 용이하다. JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999의 일부에 토대를 두고 있다. JSON은 완벽하게 언어로 부터 독립적이지만 C-family 언어 - C, C++, C#, Java, JavaScript, Perl, Python 그외 다수 - 의 프로그래머들에게 친숙한 관습을 사용하는 텍스트 형식이다. 이러한 속성들이 JSON을 이상적인 DATA-교환 언어로 만들고 있다.
JSON은 두개의 구조를 기본으로 두고 있다:

Javascript Event 모음

onAbort 이미지를 읽다가 중단시켰을 때 발생
onActivate 개체가 활성활 될 때 발생
onAfterPrint 문서가 출력되거나 혹은 출력하기 위해 출력미리보기를 한후에 발생
onAfterUpdate 데이터영역 개체에서 발생하는 이벤트로 데이터 소스 오브젝트내의 데이터가 업데이트 되었을 때 발생
onBeforeActivate 개체가 활성화 상태로 되기 바로 직전에 발생
onBeforeCopy 선택 영역이 시스템의 클립보드로 복사되기 바로 직전에 발생
onBeforeCut 선택 영역이 지워지기 바로 직전에 발생
onBeforedeActivate 현재 개체에서 다른 개체로 activeElement가 바뀌기 직전에 발생
onBeforeEditFocus 편집가능한 개체 내부에 포함된 개체가 편집활성화 된 상태가 되거나 혹은 편집가능한 개체가 제어를 위해 선택될 때 발생

JSON의 기본

기본적인 형태는 아래와 같이 사용이 가능하다.

1)
프로퍼티 <->
var obj = {
   "
프로퍼티 이름" : "",
}

2)
메소드
var obj = {
   "
메소드 이름" : function() {alert('This is method')}
}

3)
메소드(인수)
var obj = {
   "
메소드 이름" : function(인수) {alert('This is method')}
}

이것만으로 오브젝트 obj를 만드는 것이 가능하여, obj.프로퍼티이름 으로 값을 얻어 낼 수 있어, obj.메소드이름() 으로 "This is method"라는 대화창을 표시한다.

오브젝트

아래와 같이 myJSONObject를 만들어보고 이를 Javascript를 이용해 확인해보자.