Click here to Skip to main content
15,920,513 members
Home / Discussions / Android
   

Android

 
AnswerRe: Access files from the memory card [ANDROID] Pin
Public Member2-May-14 4:47
Public Member2-May-14 4:47 
Questionregarding andriod app development Pin
Member 1077476325-Apr-14 2:07
Member 1077476325-Apr-14 2:07 
AnswerRe: regarding andriod app development Pin
thatraja25-Apr-14 2:25
professionalthatraja25-Apr-14 2:25 
GeneralRe: regarding andriod app development Pin
Oluwafikayo Ajayi27-Apr-14 6:05
Oluwafikayo Ajayi27-Apr-14 6:05 
AnswerRe: regarding andriod app development Pin
Member 103641926-May-14 2:35
Member 103641926-May-14 2:35 
Questionsdk installation problem Pin
Member 1077241524-Apr-14 19:16
Member 1077241524-Apr-14 19:16 
AnswerRe: sdk installation problem Pin
Oluwafikayo Ajayi27-Apr-14 6:10
Oluwafikayo Ajayi27-Apr-14 6:10 
AnswerRe: sdk installation problem Pin
Mohsin Munawar27-Apr-14 18:59
Mohsin Munawar27-Apr-14 18:59 
Questionmove one page to another page by clicking on button in android using eclips Pin
subhas00021-Apr-14 23:03
subhas00021-Apr-14 23:03 
AnswerRe: move one page to another page by clicking on button in android using eclips Pin
Oluwafikayo Ajayi27-Apr-14 6:18
Oluwafikayo Ajayi27-Apr-14 6:18 
Questionprogramming for handheld devices with SQL Server ? Pin
Member 245846719-Apr-14 18:23
Member 245846719-Apr-14 18:23 
QuestionImplement a web server based on REST Protocol in android Pin
eb.shirani18-Apr-14 21:31
eb.shirani18-Apr-14 21:31 
AnswerRe: Implement a web server based on REST Protocol in android Pin
Richard MacCutchan18-Apr-14 22:07
mveRichard MacCutchan18-Apr-14 22:07 
GeneralRe: Implement a web server based on REST Protocol in android Pin
eb.shirani18-Apr-14 22:25
eb.shirani18-Apr-14 22:25 
GeneralRe: Implement a web server based on REST Protocol in android Pin
Richard MacCutchan18-Apr-14 22:33
mveRichard MacCutchan18-Apr-14 22:33 
AnswerRe: Implement a web server based on REST Protocol in android Pin
Sudheendra8721-Apr-14 19:56
Sudheendra8721-Apr-14 19:56 
Questioncomo fazer um cliente servidor? Pin
willian baroni6-May-14 10:18
willian baroni6-May-14 10:18 
QuestionHow to pass database record one activity to another activity Pin
Rafique Android Developer17-Apr-14 4:59
Rafique Android Developer17-Apr-14 4:59 
AnswerRe: How to pass database record one activity to another activity Pin
Yuvraaz Poudel17-Apr-14 20:14
Yuvraaz Poudel17-Apr-14 20:14 
Questionhow to view data from mysql use php and these data show in android app in listview Pin
Rafique Android Developer17-Apr-14 4:50
Rafique Android Developer17-Apr-14 4:50 
Questionmy navigation drawer doesnot work in android version less than 4.1. Pin
Yuvraaz Poudel16-Apr-14 20:44
Yuvraaz Poudel16-Apr-14 20:44 
Questiontext Pin
Member 107342698-Apr-14 9:54
Member 107342698-Apr-14 9:54 
AnswerRe: text Pin
Richard MacCutchan8-Apr-14 9:56
mveRichard MacCutchan8-Apr-14 9:56 
AnswerRe: text Pin
Member 1069480010-May-14 10:08
Member 1069480010-May-14 10:08 
QuestionMainActivity or MainFragment? Pin
Jassim Rahma4-Apr-14 3:15
Jassim Rahma4-Apr-14 3:15 
Hi,

I have just created a default Android Studio project with navigation drawer. The project was created with:

MainActivity.java
NavigationDrawerFragment.java


and

activity_main.xml
fragment_main.xml
fragment_navigation_drawer.xml


does this mean my startup will be an activity not fragment?

Do I need to change it?

I am trying to set the item actions in the navigation drawer like this:

Java
private void selectItem(int position) {
    mCurrentSelectedPosition = position;
    Fragment fragment = null;

    switch (position) {
        case 0:
            fragment = new WeatherFragment();
            break;
        case 1:
            fragment = new WeatherFragment();
            break;
        case 2:
            fragment = new WeatherFragment();
            break;

        default:
            break;
    }

    if (mDrawerListView != null) {
        mDrawerListView.setItemChecked(position, true);
    }

    if (mDrawerLayout != null) {
        // android.support.v4.app.FragmentManager fragmentManager = getFragmentManager();
        // fragmentManager.beginTransaction().replace(R.id.fragment_main, fragment).commit();

        // mDrawerList.setItemChecked(position, true);
        // mDrawerList.setSelection(position);
        // getActionBar().setTitle(mNavigationDrawerItemTitles[position]);
        // mDrawerLayout.closeDrawer(mDrawerList);
        mDrawerLayout.closeDrawer(mFragmentContainerView);
    }
    if (mCallbacks != null) {
        mCallbacks.onNavigationDrawerItemSelected(position);
    }
}


so what this line should be:

Java
fragmentManager.beginTransaction().replace(R.id.fragment_main, fragment).commit();



replace an activity or fragment.


Thanks,
Jassim


Technology News @ www.JassimRahma.com

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.