Category Archives: Android

Android project cấu hình trong git

- Xóa folder /bin, /gen
- git add -Af
- git commit -m 'remove bin, gen folder'
- Tạo file .gitignore có nội dung:
- git add -Af
- git commit -m 'add gitignore file'
- Khi run project bằng eclipse, khi gặp lỗi: AndroidManifest.xml: error: Unable to open file for read: No such file or directory thì chọn
    Project -> Clean...

Pass values between Fragments, Activity

1) to send data from fragment to activity

Intent intent = new Intent(getActivity().getBaseContext(), TargetActivity.class);
intent.putExtra("message", message);

2) to receive this data in Activity:

Intent intent = getIntent();
String message = intent.getStringExtra("message");

Continue reading Pass values between Fragments, Activity

Next bookmark trong eclipse

Nếu bạn nào đã quen dùng các editor khác như Notepad++ hay Sublime Text 2, sẽ thường dùng Ctlr + F2 để add bookmark. Phím F2 để di chuyển giữa các bookmark với nhau.

Nhưng với Eclipse thì khác, sau khi ta add bookmark bằng phím Ctrl + F2, ta dùng phím F2 để move thì không được, vì mặc định Eclipse không có chức năng này. Để bật lên, ta cần config như sau: Continue reading Next bookmark trong eclipse

Import an existing Android project into current Eclipse

1) File->Import->General->Existing Projects into Workspace, Next
2) Select root directory: /path/to/project
3) Projects->Select All
4) UNCHECK both "Copy projects into workspace" and "Add project to working sets"
5) Finish

Thêm android source code và javadoc vào ECLIPSE

In this Android tutorial, we will see how to add Javadoc in Eclipse IDE which can be very helpful for our development process. If you would like to see even the source code for Android API classes, you can do that too by attaching the Android source code within Eclipse IDE.

Java source:
Continue reading Thêm android source code và javadoc vào ECLIPSE

Beginning Android 4 Application Development – Sách Android cho các bạn chập chững

Understand Android OS for both smartphone and tablet programming

This fast-paced introduction to the newest release of Android OS gives aspiring mobile app developers what they need to know to program for today’s hottest Android smartphones and tablets. Android 4 OS is, for the first time, a single solution for both smartphones and tablets, so if you master the information in this helpful guide, you’ll be well on your way to successful development for both devices. From using activities and intents and creating rich user interfaces to working with SMS, messaging APIs, and the Android SDK, what you need is here.
Continue reading Beginning Android 4 Application Development – Sách Android cho các bạn chập chững