More Games - PAINONE

Android games

sites.google.com

 

 

 

 

 

 

 

 

탱그램 퍼즐 - Google Play 앱

탱그램 퍼즐 게임입니다. 빈공간으로 도형을 이동하여 빈공간을 모두 채우고 정해진 모양을 만들어야 하는 게임입니다. 스테이지에 따라 힌트가 없을 수도 또는 1개 이상에 힌트가 존재합니다.

play.google.com

 

More Games - PAINONE

Android games

sites.google.com

 

More Games - PAINONE

Android games

sites.google.com

 

 

벽돌깨기 - Google Play 앱

벽돌깨기 게임 입니다. 화면 하단 패들을 이동하여 볼이 하단으로 떨어지지 않게 하여, 맵에 있는 모든 벽돌을 파괴해야 하는 게임입니다. 게임 방법 화면을 터치하면 볼이 발사되고, 화면을 좌우로 드래그 하면 패들이 이동합니다.

play.google.com

 

 

More Games - PAINONE

Android games

sites.google.com

 

More Games - PAINONE

Android games

sites.google.com

뉴스 모아

언론사에서 제공하는 RSS를 이용하여 여러 언론사에서 제공하는 뉴스를 모두 이용하는 뉴스 앱.

- 언론사 RSS -
여러 언론사 RSS를 이용하여 앱 하나로 뉴스정보를 이용!

- 분류별 RSS -
주요뉴스, 정치, 경제, 연예, 스포츠 등 분류별로.

- 키워드 뉴스 -
특정 키워드를 직접 등록하여,
등록한 키워드에 해당하는 뉴스를 실시간으로

- 언론사 목록 -
동아일보
조선일보
한겨레
경향신문
국민일보
세계일보
MBN
뉴시스
이데일리
파이낸셜뉴스
헤럴드경제
아시아경제
노컷뉴스
오마이뉴스
아이뉴스24
ZDNet Korea
전자신문
데이터넷
스타뉴스
스포츠동아
스포츠경향
인벤
코리아헤럴드

 

 

뉴스 모아(키워드 뉴스) - Google Play 앱

뉴스 모아는 언론사에서 제공하는 RSS를 이용하여 여러 언론사에서 제공하는 뉴스를 모두 이용하실수 있습니다. - 언론사 RSS - 여러 언론사 RSS를 이용하여 앱 하나로 뉴스정보를 이용하실수 있습니다. - 분류별 RSS - 주요뉴스, 정치, 경제, 연예, 스포츠 등 분류별로 뉴스정보를 이용하실수 있습니다. - 키워드 뉴스 - 특정 키워드를 직접 등록하여, 등록하신 키워드에 해당하는 뉴스를 실시간으로 이용하실 수 있습니다. 예를 들어 '소녀시대' 라는 키

play.google.com

 

 

More Games - PAINONE

Android games

sites.google.com

 

More Games - PAINONE

Android games

sites.google.com

단말기 해상도 구하기
 
Display display = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
 
위 방법으로 구한 해상도는 단말기 해상도이지 View의 해상도가 아니다.
실제 단말기에 제목 표시줄/상태 표시줄 등이 50~70px 정도를 차지하므로 프로그램을 작성할때 감안하여 처리.
 
View의 높이를 단말기 해상도 높이와 같이 설정하면 View의 하단부분이 잘려진다.
또 Touch이벤트 핸들러를 작성하는 위치에 따라 View가 기준이 아니라 화면 전체를 기준으로 해서
좌표를 구하는 경우 Touch 이벤트에서 구한 세로 좌표가 View의 세로좌표에서 50~70px차이가 난다.
 
쉽게 문제를 해결하는 방법으로 Full Screen모드로 설정하기
AndroidManifest 설정방법
activity에 Theme속성
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 상태표시줄/제목표시줄 제거
android:theme="@android:style/Theme.NoTitleBar"	제목 표실줄 제거
 
Java Code 설정방법
// 상태표시줄 제거(Full Screen으로 하더라도 제목표시줄은 남는다.)
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
// 제목 표시줄 제거
requestWindowFeature(Window.FEATURE_NO_TITLE);

'Android > Develop' 카테고리의 다른 글

AutoCompleteTextView 리스트 클릭 이벤트  (0) 2011.02.01
 

More Games - PAINONE

Android games

sites.google.com

 

More Games - PAINONE

Android games

sites.google.com

AutoCompleteTextView 구현과 리스트 클릭 이벤트

main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:orientation="vertical"
	android:layout_width="fill_parent"
	android:layout_height="fill_parent"
	>
	<AutoCompleteTextView
		android:id="@+id/autoComplete"
		android:layout_width="fill_parent"
		android:layout_height="wrap_content"
		/>
	<TextView
		android:id="@+id/textView"
		android:layout_width="fill_parent"
		android:layout_height="wrap_content"
		/>
</LinearLayout>​
package exam.AutoComplete;

import android.app.*;
import android.content.*;
import android.os.*;
import android.view.*;
import android.view.inputmethod.*;
import android.widget.*;
import android.widget.AdapterView.OnItemClickListener;

public class AutoComplete extends Activity {
	private String[] COUNTRIES = new String[] {
		"asp.net",
		"php",
		"java",
		"javascript",
		"flex",
		"actionscript",
		"jsp"
	};
	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
        
		AutoCompleteTextView autoComplete = (AutoCompleteTextView)findViewById(R.id.autoComplete);
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, COUNTRIES);
		autoComplete.setAdapter(adapter);
		// AutoCompleteTextView 자동완성 리스트에 클릭 이벤트
		autoComplete.setOnItemClickListener(new OnItemClickListener() {
			public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
				AutoCompleteTextView autoComplete = (AutoCompleteTextView)findViewById(R.id.autoComplete);
				TextView textView = (TextView)findViewById(R.id.textView);
				textView.setText(autoComplete.getText());
				// 열려있는 키패드 닫기
				InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
				imm.hideSoftInputFromWindow(autoComplete.getWindowToken(), 0);
			}
		});
	}
}
​

리스트 스타일을 바꿔보자.
레이아웃 xml파일을 새로 만들고 아래와 같이 작성
auto_complete_list.xml

<?xml version="1.0" encoding="utf-8"?>
<TextView
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="fill_parent"
	android:layout_height="wrap_content"
	android:textSize="7pt"
	android:textColor="#FF0000"
	android:padding="6px"
	/>
​

아래 소스 부분을

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, COUNTRIES);
​

새로 만든 레이아웃으로 변경

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.auto_complete_list, COUNTRIES);
​

'Android > Develop' 카테고리의 다른 글

단말기 해상도 구하기  (0) 2011.03.12
 

More Games - PAINONE

Android games

sites.google.com

+ Recent posts