안녕하세요 저는 아직 경력이 1년도안된 초보 안드로이드 개발자 입니다.
이것저것 해보고 있는 과정에서 피키캐스트를 모티브로한 저만의 프로젝트를 만들어 보려고 하는데요
피키캐스트 메인 화면 처럼 메뉴 버튼을 누르면 드로워 레이아웃이 보이게끔 만들고 싶습니다.
일단 드로워 레이아웃 구현은 구글링을 통하여 성공 하였습니다
여기서 질문 드리겠습니다.
피키캐스트앱을 보면 가장 상단에 피키캐스트 로고가 있고 좌우로 메뉴버튼과 서치 버튼
그아래로 이미지뷰와 리스트뷰를 이용한 이미지뷰/텍스트뷰 로 구성 되어 있는걸 확인할수 있었습니다.
정말 궁금한점은 xml 창에서 어떻게 구현해야하는지.. 이방법을 모르겠습니다.
ex)이소스에서 어떤부분에 drawerlayout 이 들어가야하는지 이것저것 해본결과 drawerlayout 은
한 액티비티에서 메인부분과 drawer 해서 보여질 부분을 구현 하는것 같은데 도저히 방법을 모르겟습니다..
피키캐스트 메인화면처럼 깔끔하게 만들기 위해서는 어떤 작업을 해야할가요..
조언좀 부탁드립니다!
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="565dp" >
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="menu" />
<Button
android:id="@+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="search" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/button2"
android:layout_alignBottom="@+id/button2"
android:layout_centerHorizontal="true"
android:text="Blessing"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>