본문 바로가기

Development/Android74

[안드로이드] Android Image Volley 분석 02 안녕하세요 푸민입니다.저번 글에서 RequestQueue 라는 클래스를 만들때 Volley 클래스를 이용해서 만드는 것을 해보았습니다. 이어서 진행해 보면 RequestQueue 의 생성자를 보겠습니다. public RequestQueue(Cache cache, Network network, int threadPoolSize, ResponseDelivery delivery) {mCache = cache;mNetwork = network;mDispatchers = new NetworkDispatcher[threadPoolSize];mDelivery = delivery;} public RequestQueue(Cache cache, Network network, int threadPoolSize) {this(.. 2015. 9. 16.
[안드로이드] Android Image Volley 분석 01 안녕하세요 푸민입니다.안드로이드에서 권장하는 이미지 Api인 Volley 에 대해서 한번 분석해보겠습니다. 먼저 Volley 를 사용할 때는 RequestQueue 를 생성합니다. RequestQueue 를 생성할때 Volley 클래스의 newRequestQueue 메소드를 사용합니다. public class Volley {private static final String DEFAULT_CACHE_DIR = "volley"; public static RequestQueue newRequestQueue(Context context, HttpStack stack) {File cacheDir = new File(context.getCacheDir(), DEFAULT_CACHE_DIR);String userAg.. 2015. 9. 11.
[안드로이드] Font 적용하기 안녕하세요 푸민입니다.안드로이드에서 폰트를 적용하려면 해당 폰트 파일을 리소스로 넣어줘야합니다. 먼저 원하는 폰트를 자신의 프로젝트에 assets 폴더에 넣어줍니다. MyProject-> assets assets 폴더에는 여러가지 활용할 수 있는 파일들을 넣어줄수 있는곳인데요.주로 폰트나 각종 설정 파일을 많이 넣어서 개발을 했어요! 그리고는 직접 코드에서 적용을 할 수 있습니다. Typeface tf = Typeface.createFromAsset(Context.getAssets(), "font.ttf"); textView.setTypeface(tf); 먼저 코드에서 할 작업은 Typeface 객체를 생성해 주는 것입니다. 해당 객체의 생성자에서는 Assets 과 폰트의 이름을 요청합니다.각각 잘 넣어.. 2015. 9. 10.
[안드로이드] 이미지 슬라이딩, Flip 효과 안녕하세요 푸민입니다.Flip 기능은 뷰페이저처럼 미끄러지듯이 슬라이딩하여 다음것을 보여주는 기능입니다! View 를 이용하여 Flip 기능을 한번 구현해볼까요? 코드 public class ImageFlipView extends View {…} 설명 View 를 상속 받은 클래스를 만들어 줍니다. 이미지를 설정할 메소드를 만들어줍니다. 코드 private Bitmap bitmap = null;public void setBitmap(Bitmap bitmap) {this.bitmap = Bitmap.createScaledBitmap(bitmap, width, height, true);invalidate();} 설명 Bitmap 이미지를 설정할수 있는 setBitmap() 를 생성합니다. 이미지를 설정한 뒤.. 2015. 9. 9.