2015년 4월 9일 목요일

Android 제공 아이콘

버전별 지원 drawable 확인 가능
http://androiddrawables.com/

코드상에서 접근 :
android.R.drawable.xxxx 와 같은 형식으로 접근하면 된다.

xml 레이아웃에서 접근 :
<ImageButton android:layout_height="wrap_content" android:src="@android:drawable/ic_menu_help"

아이콘 무료 제공
http://materialdesignicons.com/


안드로이드 아이콘 디자인 가이드라인/팁

http://baekhorang.tistory.com/226
위 사이트에 가서 디자인 가이드라인 내용을 참고 할 것.

2015년 4월 8일 수요일

EditPlus 설정 백업/복원

에디트플러스 의 설정을 백업, 복원 파일 위치 및 방법

win7일 경우 : C:\Users\해당계정명\AppData\Roaming\EditPlus 3
위 폴더에서 editplus_u.ini 파일과 ftp2_u.ini파일이 백업파일.

editplus_u.ini : Editplus의 환경설정
ftp2_u.ini : FTP 계정 설정.

환경설정 파일 다운로드

2015년 4월 7일 화요일

Material Desigin appcompat-v7:22.0.0 toolbar 토글 아이콘

gradle dependency:
compile 'com.android.support:appcompat-v7:22.0.0'


import all of:
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.content.res.Configuration;


styles.xml :
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


in Activity :

// 툴바 토글 리스너를 드로어레이아웃 리스너에 연결
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.app_name, R.string.app_name);
mDrawerLayout.setDrawerListener(mDrawerToggle);
// appcompat-v7:22.0.0 일때 아래를 추가하면 토글 아이콘이 나타남
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

2015년 4월 6일 월요일

android - php 로그인 세션 유지에 대한 고찰

# shared preference
http://unikys.tistory.com/351

# 세션 유지
http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_function&wr_id=408594

[library] 토스트 꾸미기

android Toast 를 꾸밀수 있는 외부 라이브러리

https://github.com/JohnPersano/SuperToasts

2015년 4월 3일 금요일

순차번호 리소스 아이디 가져오기

        mListImgBtn = new ArrayList<>();
        Resources resources = rootView.getResources();
        ImageButton imgBtn;
        for(int i=0; i<10; i++)
        {
            int resId = resources.getIdentifier("button"+i, "id", getActivity().getPackageName());
            imgBtn = (ImageButton) rootView.findViewById(resId);
            imgBtn.setTag(Integer.toString(i));
            imgBtn.setOnClickListener(mClickListener);
            mListImgBtn.add(i, imgBtn);
        }

리소스 아이디 스트링 으로 가져오기


레이아웃 파일에 @+id/button 으로 작성했고 아이디가 스트링으로 필요할때

button.getResources().getResourceEntryName(button.getId())