본문 바로가기
[android] custom actionbar theme example android, custom actionbar theme example actionbar, actionbarstyle, actionBarTabTextStyle, android:actionbarstyle, android:actionBarTabTextStyle, android:background, android:textcolor, android:titleTextStyle, app theme, background, CODE, custom actionbar, custom actionbar theme, exmaple, sample, tab theme, TextAppearance.AppCompat.Widget.ActionBar.Title", textcolor, textsize, theme.appcompat.ligh.. 2014. 3. 10.
[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.
[Java] How to implements Iterator. Java, How to implements Iterator. Aggregate 인터페이스 public interface Aggregate{public abstract Iterator iterator();} Iterator 를 제공하려는 container class 는 Aggregate 를 implements 해야 함.Aggregate Interface 를 implement 한 class 를 ConcreteAggregate class 라 부른다. Iterator 인터페이스 public interface Iterator{public abstract boolean hasNext();public abstract Object enxt();} Iterator 를 구현한 class 를 ConcreteIterator .. 2014. 1. 10.
[Java] Reflection Tutorial - Dynamic Class Loading and Reloading. Java, Reflection Tutorial - Dynamic Class Loading and Reloading. Java 에서 dynamic 하게 class 를 load 혹은 reload 할 수 있다. The ClassLoader Java 의 모든 class 는 ClassLoader의 subclass 를 이용하여 로드된다.한 class 가 load 될 때 다른 연관된 ( refer 된 ) class 들도 모두 함께 recursive 하게 load 된다. The ClassLoader Hierachy 새로운 class loader 를 작성할 떄면 반드시 Java 의 기본 ClassLoader 를 상속하여 이용해야 한다. 먼저 parent ClassLoader 를 이용하여 load 를 시도하고, paren.. 2014. 1. 9.
[Java] Generic Type Tutorial. Java, Generic Type Tutorial. Generic Type. 주로 Java Collection 에서 많이 사용한다.Collection 에서는 어떤 자료를 담을지 알 수 없으므로 최상위 객체인 Object 형태로 저장 및 관리하도록 설계되어 있다. 하지만 이렇게 Object 로만 두게 되면, 일관성 있는 Type 을 유지할 수 없는 경우도 많이 생긴다. 일관성 있는 Type 을 유지하지 못하면, Runtime Error 에 마딱뜨릴 확률이 높아져서 좋지 않다. 이것을 해결하기 위해 Compile Time 에 원하지 않는 Type 이 들어가는 것을 방지하기 위해 고안 된 것이 Generic Type 이다. Generic Class 정의 // T 라는 객체를 다루는 Containerpublic.. 2014. 1. 6.
[android] Up Navigation 설정하기. android, Up Navigation 설정하기. Up Navigation 설정하기 1. manifest 에서 parent 로 지정한다. 4.1 이상에서는 activity tag 에 android:parentActivityName 를 적용하면 된다. 4.0 이하에서는 meta-data 를 통해 설정해준다. 2. actionbar 설정을 바꿔준다.( up 을 지원하도록 ) getActionBar().setDisplayHomeAsUpEnabled(true); 3. Navigate up 하기. NavUtils.navigateUpFromSameTask() 를 통해서 할 수 있다. 이것이 불리면 현재 Activity 는 종료되면서 stack 의 상단에 있는 녀석이 호출된다. 이 때 FLAG_ACTIVITY_CL.. 2013. 12. 19.
[android] NavigationDrawer Tutorial android, NavigationDrawer Tutorial Layout You should use DrawerLayout to enable your app edge activated for open drawer automatically.Otherwise you have to implement drawer open touch event by yourself. You must keep in mind that FrameLayout that is responsible for drawer has to be come last.Because android draws xml declared layout from the bottom so that the drawer will be come most upper part.. 2013. 11. 28.
[Java] Reflection Tutorial - Class [Java] Reflection Tutorial - Class Java Reflection 은 class, interface, field, 그리고 method 를 runtime 에 조사할 수 있도록 해준다. 새로운 object 를 만들 수도 있고, method 를 호출할 수도 있다. script language 가 runtime 에 java 의 함수를 호출한다거나, database table 과 object 를 맞출 때 자주 사용한다. Class Class 로 부터 얻을 수 있는 정보들. Class NameClass Modifier ( public, private, synchronized... )Pakcage InfoSuper classImplemented InterfacesConstructorsMeth.. 2013. 11. 12.
[android] TaskStackBuilder Tutorial android TaskStackBuilder Tutorial API Level 11 이상에서는 ( 3.0 / HoneyComb ) back key 를 통한 navigation convention 이 바뀌었다.back key 의 behavior 는 현재 task 에서의 조작만을 의미하고, 다른 task 로의 이동은 없다.이전 task로의 inter task 이동은 "recents" 를 통해서 가능하다. android 3.0 이후에서 한 task stack 에서 다른 task 로 이동하는 경우, 어플리케이션은 back stack 과 history 를 융합시켜서 유저가 back 키 여러번 눌러 launcher 로 나갈 수 있게 해야 한다. back key 를 눌러서 다른 task 로 이동하면 안된다. Task.. 2013. 10. 27.
반응형