Java/Android NavDrawer troubles (Newbiee) -


hi i'm new @ programming.

i followed great tutorial , works fine.

now i'am trying 2 things:

  1. create picture in top of navdrawer(want call profilepicture , name here , make button @ same time)

  2. and add buttons top menu.

i tried lot of different approaches without success.

do have tips how ?

i'm using android studio. in advance.

strings.xml:

    <?xml version="1.0" encoding="utf-8"?> <resources>  <string name="app_name">rider</string> <string name="action_settings">settings</string> <string name="hello_world">hello world!</string> <string name="drawer_open">rider menu opened</string> <string name="drawer_close">rider menu closed</string>  <!-- nav drawer menu items --> <string-array name="nav_drawer_items">      <item >profile</item>     <item >club</item>     <item >points of interest</item>     <item >calender</item>     <item >help</item>     <item >share</item> </string-array>  <!-- nav drawer list item icons --> <!-- keep them in order titles in --> <array name="nav_drawer_icons">      <item>@drawable/ic_home</item>     <item>@drawable/ic_people</item>     <item>@drawable/ic_photos</item>     <item>@drawable/ic_communities</item>     <item>@drawable/ic_pages</item>     <item>@drawable/ic_whats_hot</item> </array>  <!-- content description --> <string name="desc_list_item_icon">item icon</string> 

fragment_profile.xml:

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent">   <textview     android:id="@+id/txtlabel"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_centerinparent="true"     android:textsize="16dp"     android:text="profile"     android:textstyle="bold" />  <imageview android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_below="@id/txtlabel"     android:src="@drawable/ic_home"     android:layout_centerhorizontal="true"     android:layout_margintop="10dp"/>  </relativelayout> 

profilefragment.java:

package info.androidhive.slidingmenu;  import android.app.fragment; import android.os.bundle; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup;  public class profilefragment extends fragment {  public profilefragment(){}  @override public view oncreateview(layoutinflater inflater, viewgroup container,         bundle savedinstancestate) {      view rootview = inflater.inflate(r.layout.fragment_profile, container, false);      return rootview; } } 


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -