본문 바로가기
Android Open Source - Free Flow Android Open Source - Free Flow https://github.com/Comcast/FreeFlow ListView 를 제공하는데, VLayout, HLayout, GridVLayout, GridHLayout 등을 함께 제공하여, ListView 의 layout 들을 transition 과 함께 부드럽게 제공한다는 점이 주된 기능이다. 소개에는 view container 와 layout 의 decoupling 을 한다고 하는데..위에 명시된 layout 들을 이용해서 view container 의 변화 없이 layout 을 쉽게 바꾸고 그에 따른 animation 도 제공해준다. 아직 약간의 버그같은 것들은 있고, 안드로이드 앱에서 이정도까지 지원해야 하나? 싶은 감은 있지만,좋은 .. 2014. 5. 20.
Android Transition Framework (TransitionManager, Transition, Scene) 의 작동 원리 Android Transition Framework (TransitionManager, Transition, Scene) 의 작동 원리 참조 : http://lucasr.org/2014/03/13/how-android-transitions-work/ Transition Framework Transition 은 layout change 에 대한 animation 을 지원한다.layout change 는 add, remove, move, resize, show, hide 등을 이야기한다. Transition Framework 는 3개의 핵심으로 구성된다. Scene Root, Scene, Transition. Scene Root 는 ViewGroup 으로 Transition 이 일어나는 배경이 되는 Cont.. 2014. 4. 30.
android:foreground 속성은 언제 쓰이는가? android:foreground 는 android:background 와 반대되는 개념이다. android:foreground 의 경우는 main contents 를 가리면 안 되기 때문에 보통 alpha 를 먹인 이미지나 색상 등을 사용하며,어떤 item 을 선택했을 때 background selector 와 같은 효과를 볼 수 있지만, 앞쪽(컨텐츠보다 z 축으로 우리 눈쪽에 가깝게)에서 press 된 상태를 보기 위해 보통 사용된다. 말인 즉슨, 만약 어떤 버튼을 클릭하는데, 그 버튼의 컨텐츠가 버튼의 거의 전부를 cover 하고 있다면,selector를 background 로 설정했을 때, 해당 버튼을 press 하면 해당 버튼이 눌렸는지 판단하기 어렵다.이 경우 selector 를 foregro.. 2014. 4. 14.
[android] bitmap recycle 사용시 주의사항. android, bitmap recycle 사용시 주의사항. 알고 있었나?Bitmap.recycle() 은 async 였다... 음...따라서 만약에 Cache 를 사용하는 상황에서, 한 ImageView 에 Bitmap 을 여러번 assign 하면서 Bitmap.recycle() 을 동시에 호출한다면 예를 들어.. 아래와 같이 하면 recycled bitmap 을 사용했다고 exception 이 날 수 있다. for( int i=0; i < 5; i++ ){ runOnUiThread( new Runnable(){public void run(){BitmapHelper.recycleBitmap ( imageView ); // my helper class.AsyncImageSetter.setImage( im.. 2014. 4. 2.
[android] PullToRefreshListView up pull, down pull distinguish android, PullToRefreshListView up pull, down pull distinguish public class MainActivity extends Activity { private PullToRefreshListView mPtrlv;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView( R.layout.activity_main ); initListView();} private Handler mHandler = new Handler();private Runnable mRunnable = new Runnable() {@Overridepubl.. 2014. 2. 25.
[android] BaseAdapter의 getCount 는 불리는데 getView 가 안 불리는 현상 android, BaseAdapter의 getCount 는 불리는데 getView 가 안 불리는 현상 해당 listview 가 visible 하지 않으면 그럴 수 있다. Android, BaseAdapter, BaseAdapter의 getCount 는 불리는데 getView 가 안 불리는 현상, getcount, getView, listview, Visible 2014. 1. 13.
[android] RefreshListView source code. android, RefreshListView source code. public class RefreshListView extends ListView implements OnScrollListener{private boolean isLoading = false;private View footer;private RefreshListener listener;private RefreshAdapter adapter;public RefreshListView(Context context) {super(context);setOnScrollListener( this );} @Overridepublic void onScroll(AbsListView view, int firstVisibleItem, int visibleI.. 2014. 1. 6.
[android] FragmentPagerAdapter 사용방법 안드로이드, FragmentPagerAdapter 사용 방법 ViewPager 를 사용할 때, 이 녀석도 List 종류와 마찬가지로 adapter 를 사용할 수 있다. FragmentPageAdapter 보통 ViewPager 는 Fragment 와 혼합해서 사용하기 때문에, 대중적으로 사용되는 것은 FragmentPagerAdapter 이다.다른 Adapter 와 마찬가지로 FragmentPagerAdapter 를 상속하는 class 를 하나 만들어주고 그곳에서 public ViewPagerAdapter( FragmentManager fm )public Fragment getItem( int position )public int getCount() 를 override 해주면 된다. PagerAdapte.. 2013. 7. 23.
[android] LayoutInflater 의 LayoutParam 무시에 대한 불편한 진실. LayoutInflater 를 사용할 때 다음과 같이 자주 사용하는데, 이럴 경우 inflate 되는 view의 root의 LayoutParam 이 무시된다. LayoutInflater.from( getContext() ).inflate( R.layout.list_item, null ); 문제는 parent 에 붙이는 것이 무시되기 때문이다. 따라서, inflate 를 할 때 붙여주는 parent 를 명시해주어야 한다. LayoutInflater.from( getContext() ).inflate( R.layout.list_item, parent ); 여기서 문제가 되는 경우는, ListView 를 사용할 때인데, 저렇게 parent 를 명시해주면, 해당 parent 에 inflate 하는 view 가 .. 2012. 12. 28.
반응형