Notice»

Recent Post»

Recent Comment»

Recent Trackback»

Archive»

« 2024/5 »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

 
 

안드로이드 XML파일 자동 포맷팅

Adroid/유용한팁 | 2010. 3. 23. 15:31 | Posted by 하센세
안드로이드의 UI 작업을 하게될 경우 XML 파일의 내용이 단락별로 잘리지 않고 길게 늘어져 있는 경우가 많다.
이를 해결하기 위해 검색을 해보니 이클립스의 간단한 설정만으로 해결이 되었다.

내용은 링크를 걸어둔다.

http://www.androidpolice.com/2009/11/04/auto-formatting-android-xml-files-with-eclipse/
:

우분투 9.10 및 상위버전 vi문제 해결

Adroid | 2010. 2. 23. 19:53 | Posted by 하센세

우분투를 설치하고  vi를 사용하게 되면 방향키가 안먹고 A, B 알파벳으로 나온다든지 하는 문제점이 발생하게 된다.

이의  해법을 아래에 링크해 둔다.

 

http://cafe.naver.com/egosproject.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=53

:
안드로이드 repo sync 문제 해법


  1. go to the folder where you made “repo init” some days ago
  2. open .repo/repo/subcmds/sync.py
  3. correct _Fetch function (program will try to sync even without network after this change:-)) – add “while True:” at line 6, “break” at line 9, remove “sys.exit(1)” at line 11.
  4. 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    
      def _Fetch(self, projects):
        fetched = set()
        pm = Progress('Fetching projects', len(projects))
        for project in projects:
          pm.update()
          while True:
            if project.Sync_NetworkHalf():
              fetched.add(project.gitdir)
              break
            else:
              print >>sys.stderr, 'error: Cannot fetch %s' % project.name
        pm.end()
        return fetched

p.s. be aware – indented matter!

참고 : http://android.amberfog.com/?p=230

'Adroid' 카테고리의 다른 글

우분투 9.10 및 상위버전 vi문제 해결  (0) 2010.02.23
안드로이드 액티비티 - 첫번째 예제  (0) 2009.10.05
Android 개발자 사이트  (0) 2009.09.15
:

안드로이드 액티비티 - 첫번째 예제

Adroid | 2009. 10. 5. 15:48 | Posted by 하센세


package com.sungho.app;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.EditText;
import android.widget.ArrayAdapter;

import android.view.KeyEvent;
import android.view.View;
import android.view.View.*;

import java.util.ArrayList;


public class FirstAD extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       
        setContentView(R.layout.main);
       
        //UI 위젯의 레퍼런스를 얻어온다.
        ListView myListView = (ListView)findViewById(R.id.ListView01);
        final EditText myEditText = (EditText)findViewById(R.id.myEditText);
       
        //해야 할 일들을 담기 위한 배열 리스트(array list)를 생성한다.
        final ArrayList<String> todoItems = new ArrayList<String>();
        //위 배열을 리스트 뷰와 묶기 위한 배열 어댑터 (array adapter)를 생성한다.
        final ArrayAdapter<String> aa;
        aa = new ArrayAdapter<String>(this,
              android.R.layout.simple_list_item_1,
              todoItems);
        //위 배열 어댑터를 리스트 뷰와 묶는다.
        myListView.setAdapter(aa);
       
        myEditText.setOnKeyListener(new OnKeyListener() {
   @Override
   public boolean onKey(View v, int keyCode, KeyEvent event) {
    // TODO Auto-generated method stub
    if(event.getAction() == KeyEvent.ACTION_DOWN)
     if(keyCode == KeyEvent.KEYCODE_DPAD_CENTER)
     {
      todoItems.add(0, myEditText.getText().toString());
      aa.notifyDataSetChanged();
      myEditText.setText("");
      return true;
     }
    return false;
   }
         
        });
       
    }
}

:

Android 개발자 사이트

Adroid | 2009. 9. 15. 10:50 | Posted by 하센세

http://developer.android.com/

http://www.kandroid.org/ -- 한국 안드로이드 개발자 사이트

: