Как установить изображение зарегистрированного пользователя в элементе скользящего меню с помощью ActionbarSherlock

привет, ребята, я в беде, пожалуйста, спасите меня

Я использую библиотеку ActionBar Sherlock для реализации скользящего меню, и я сделал это, но я хочу показать зарегистрированное изображение пользователя и информацию о пользователе в первом элементе ящика скользящего меню

пожалуйста, помогите мне, вот мой код

Выдвижной ящик меню

public class SlidingMenuDrawer extends SherlockFragmentActivity{
    DrawerLayout mDrawerLayout;
    ListView mDrawerList;
    ActionBarDrawerToggle mDrawerToggle;
    MenuListAdapter mMenuAdapter;
    String[] title;
    String[] subtitle;
    int[] icon;
    ImageView image;
    Bitmap bitmap;
    Fragment fragment1 = new Welcome();
    Fragment fragment2 = new MeetPeople();
    Fragment fragment3 = new FriendsActivity();
    Fragment fragment4=new SettingProfile();
    Fragment fragment5=new Testingpic();
    private CharSequence mDrawerTitle;
    private CharSequence mTitle;


    // UserModel user=(UserModel)getIntent().getSerializableExtra("User");
    @Override
    public  void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Get the view from drawer_main.xml
        setContentView(R.layout.drawer_main);
        UserModel user=(UserModel) getIntent().getSerializableExtra("User");

        // Get the Title
        mTitle = mDrawerTitle = getTitle();

        // Generate title
        title = new String[] { "My Profile", "Meet people",
                "My Friends","Setting","Testing" };

        // Generate subtitle
        subtitle = new String[] { "", "",
                "","","" };

        // Generate icon
        icon = new int[] { R.drawable.action_about, R.drawable.action_settings,
                R.drawable.collections_cloud ,R.drawable.setting_iconn,R.drawable.setting_iconn};

        // Locate DrawerLayout in drawer_main.xml
        mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);

        // Locate ListView in drawer_main.xml
        mDrawerList = (ListView) findViewById(R.id.listview_drawer);
        //int[] colors = {0, 0xFFFF0000, 0}; // red for the example
        mDrawerList.setDivider(new ColorDrawable(0xff888888));
        mDrawerList.setDividerHeight(1);

        // Set a custom shadow that overlays the main content when the drawer
        // opens
        mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow,
                GravityCompat.START);

        // Pass string arrays to MenuListAdapter
        mMenuAdapter = new MenuListAdapter(SlidingMenuDrawer.this, title, subtitle,
                icon);

        // Set the MenuListAdapter to the ListView
        mDrawerList.setAdapter(mMenuAdapter);

        // Capture listview menu item click
        mDrawerList.setOnItemClickListener(new DrawerItemClickListener());

        // Enable ActionBar app icon to behave as action to toggle nav drawer
        getSupportActionBar().setHomeButtonEnabled(true);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setBackgroundDrawable(new 
                   ColorDrawable(Color.parseColor("#18181B"))); 


        // ActionBarDrawerToggle ties together the the proper interactions
        // between the sliding drawer and the action bar app icon
        mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
                R.drawable.ic_drawer, R.string.drawer_open,
                R.string.drawer_close) {

            public void onDrawerClosed(View view) {
                // TODO Auto-generated method stub
                super.onDrawerClosed(view);
            }

            public void onDrawerOpened(View drawerView) {
                // TODO Auto-generated method stub
                // Set the title on the action when drawer open
                getSupportActionBar().setTitle(mDrawerTitle);
                super.onDrawerOpened(drawerView);
            }
        };

        mDrawerLayout.setDrawerListener(mDrawerToggle);

        if (savedInstanceState == null) {
            selectItem(0);
        }

    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {

        if (item.getItemId() == android.R.id.home) {

            if (mDrawerLayout.isDrawerOpen(mDrawerList)) {
                mDrawerLayout.closeDrawer(mDrawerList);
            } else {
                mDrawerLayout.openDrawer(mDrawerList);
            }
        }

        return super.onOptionsItemSelected(item);
    }

    // ListView click listener in the navigation drawer
    private class DrawerItemClickListener implements
            ListView.OnItemClickListener {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position,
                long id) {
            selectItem(position);
        }
    }

    private void selectItem(int position) {

        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        // Locate Position
        switch (position) {
        case 0:
             Bundle bundle = new Bundle();
                UserModel user=(UserModel)getIntent().getSerializableExtra("User");

                String User_name=user.getUser_Full_Name();
                String url=user.getUser_Image();


                bundle.putString("User_Fullname", User_name);
                bundle.putString("User_image", url);



                Welcome fragment1 = new Welcome();
                fragment1.setArguments(bundle);
            ft.replace(R.id.content_frame, fragment1);

            break;
        case 1:

        ft.replace(R.id.content_frame, fragment2);

            //ft.replace(R.id.content_frame, fragment2);
            break;
        case 2:
            ft.replace(R.id.content_frame, fragment3);
            break;

        case 3:
            ft.replace(R.id.content_frame, fragment4);
            break;
        case 4:
            ft.replace(R.id.content_frame, fragment5);
            break;
        }
        ft.commit();
        mDrawerList.setItemChecked(position, true);

        // Get the title followed by the position
        setTitle(title[position]);
        // Close drawer
        mDrawerLayout.closeDrawer(mDrawerList);

    }

    @Override
    protected void onPostCreate(Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
        // Sync the toggle state after onRestoreInstanceState has occurred.
        mDrawerToggle.syncState();
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        // Pass any configuration change to the drawer toggles
        mDrawerToggle.onConfigurationChanged(newConfig);
    }

    @Override
    public void setTitle(CharSequence title) {
        mTitle = title;
        getSupportActionBar().setTitle(mTitle);
    }



}   

Вот мой адаптер MenuList

public class MenuListAdapter extends BaseAdapter {

    // Declare Variables
    Context context;
    String[] mTitle;
    String[] mSubTitle;
    int[] mIcon;
    LayoutInflater inflater;

    public MenuListAdapter(Context context, String[] title, String[] subtitle,
            int[] icon) {
        this.context = context;
        this.mTitle = title;
        this.mSubTitle = subtitle;
        this.mIcon = icon;
    }

    @Override
    public int getCount() {
        return mTitle.length;
    }

    @Override
    public Object getItem(int position) {
        return mTitle[position];
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    public View getView(int position, View convertView, ViewGroup parent) {
        // Declare Variables
        TextView txtTitle;
        TextView txtSubTitle;
        ImageView imgIcon;

        inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View itemView = inflater.inflate(R.layout.drawer_list_item, parent,
                false);

        // Locate the TextViews in drawer_list_item.xml
        txtTitle = (TextView) itemView.findViewById(R.id.title);
        txtSubTitle = (TextView) itemView.findViewById(R.id.subtitle);

        // Locate the ImageView in drawer_list_item.xml
        imgIcon = (ImageView) itemView.findViewById(R.id.icon);

        // Set the results into TextViews
        txtTitle.setText(mTitle[position]);
        txtSubTitle.setText(mSubTitle[position]);

        // Set the results into ImageView
        imgIcon.setImageResource(mIcon[position]);

        return itemView;
    }

}

пожалуйста, скажите мне, как установить зарегистрированное изображение пользователя. У меня есть ImageUrl

заранее спасибо


person ᏕᏗᎷᎷᎩ ᏇᏗᏕᏋᏋᎷ    schedule 25.08.2014    source источник
comment
я предполагаю, что это неправильный способ сделать. Вы должны динамически брать изображение и имя пользователя... но здесь вы используете статические массивы.   -  person kgandroid    schedule 05.09.2014
comment
stackoverflow.com/questions/22258232 /   -  person kgandroid    schedule 05.09.2014
comment
Что мне нужно использовать, пожалуйста, скажите мне правильно .. Я новичок, поэтому, пожалуйста, решите мою проблему .. и спасите меня   -  person ᏕᏗᎷᎷᎩ ᏇᏗᏕᏋᏋᎷ    schedule 05.09.2014