Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/215.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java.lang.IllegalArgumentException:找不到id为0x7f0d00a0的视图_Java_Android_Android Fragments - Fatal编程技术网

java.lang.IllegalArgumentException:找不到id为0x7f0d00a0的视图

java.lang.IllegalArgumentException:找不到id为0x7f0d00a0的视图,java,android,android-fragments,Java,Android,Android Fragments,嗨,伙计们,当我将数据从活动传递到片段时,我得到以下错误: java.lang.RuntimeException: Unable to start activity ComponentInfo{info.androidhive.materialtabs/info.androidhive.materialtabs.activity2.ScrollableTabsActivity2}: java.lang.IllegalArgumentException: No view found for id

嗨,伙计们,当我将数据从活动传递到片段时,我得到以下错误:

java.lang.RuntimeException: Unable to start activity ComponentInfo{info.androidhive.materialtabs/info.androidhive.materialtabs.activity2.ScrollableTabsActivity2}: java.lang.IllegalArgumentException: No view found for id 0x7f0d00a0 (info.androidhive.materialtabs:id/acab) for fragment MyListFragment2{b731e17 #0 id=0x7f0d00a0}
这是传递数据的代码:

Bundle bundle = new Bundle();
            bundle.putIntegerArrayList("oki", hm);
            bundle.putIntegerArrayList("okiquantitapizze", hm_quantitàpizze);
MyListFragment2 myFragment = MyListFragment2.newInstance(hm,hm_quantitàpizze);
            FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
            //transaction.replace(android.R.id.content, myFragment);
            transaction.replace(R.id.acab, myFragment);

            transaction.commit();
其中R.id.acab是从活动中获取数据的片段的id

这是片段(从活动中获取数据)XML:


现在我发布活动xml:

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/container">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/colorPrimaryDark"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="20dp"
                android:gravity="center"
                android:orientation="horizontal" >

TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/welcome"
                    android:textSize="20dp"
                    android:layout_marginLeft="5dp"
                    />
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textSize="20dp"
                    android:layout_marginLeft="5dp"
                    android:id="@+id/numero_tavolo"
                    />

                <TextView
                    android:id="@+id/name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="10dp"
                    android:textColor="@color/lbl_name"
                    android:textSize="24dp"
                    android:layout_marginLeft="5dp"
                    />


            </LinearLayout>

        </android.support.v7.widget.Toolbar>

        <android.support.design.widget.TabLayout
            android:id="@+id/tabss"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:tabMode="scrollable"
            android:background="@color/colorPrimaryDark" />
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/viewpagerr"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" >

    </android.support.v4.view.ViewPager>


</android.support.design.widget.CoordinatorLayout>

文本框
android:layout\u width=“包装内容”
android:layout\u height=“包装内容”
android:text=“@string/welcome”
android:textSize=“20dp”
android:layout_marginLeft=“5dp”
/>
活动:

public  class ScrollableTabsActivity2 extends AppCompatActivity {

    private Toolbar toolbar;
    private TabLayout tabLayout;
    private ViewPager viewPager;
    private Button cazzo;
    //private SQLiteHandler db;
    private SessionManager session;
    private TextView txtName;
    private TextView txtEmail;
    int s;
    String intentt="";
    File file;
    Uri filePath;
    ListView lv;
    ArrayList<Integer> hm=new ArrayList<>();
    String path=null;
    ArrayList<Planet> planetList=new ArrayList();

    private String myString = "azz";
     ArrayList<Integer> arraylistInteger;
    String value="";
    String numero_tavolo="";
    ArrayList<Integer> hm3=new ArrayList<>();
    ArrayList<Integer> hm_quantitàpizze=new ArrayList<>();
    TextView numero_tavolo_text_view;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_scrollable_tabs2);


        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        txtName = (TextView) findViewById(R.id.name);
        txtEmail = (TextView) findViewById(R.id.numero_telefonico);
        numero_tavolo_text_view=(TextView)findViewById(R.id.numero_tavolo);



        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        viewPager = (ViewPager) findViewById(R.id.viewpagerr);
        setupViewPager(viewPager);

        tabLayout = (TabLayout) findViewById(R.id.tabss);
        tabLayout.setupWithViewPager(viewPager);


        Bundle extras = getIntent().getExtras();
        if (extras != null) {
             value = extras.getString("PATH FILE DA AGGIORNARE");
            numero_tavolo=extras.getString("NUMERO_TAVOLO");
            file = new File(value);
            System.out.println("FILE:" + file);

            FileInputStream is = null;
            try {
                is = new FileInputStream(file);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }

            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder dBuilder = null;
            try {
                dBuilder = dbFactory.newDocumentBuilder();
            } catch (ParserConfigurationException e) {
                e.printStackTrace();
            }
            Document doc = null;
            try {
                doc = dBuilder.parse(is);
            } catch (SAXException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }

            Element element = doc.getDocumentElement();
            element.normalize();

            int a;
            int b;
            NodeList nList = doc.getElementsByTagName("checkboxes_pizza");
            hm.clear();
            hm_quantitàpizze.clear();

            for (int i = 0; i < nList.getLength(); i++) {
                Node node = nList.item(i);

                if (node.getNodeType() == Node.ELEMENT_NODE) {
                    Element element2 = (Element) node;
                    //tv1.setText(tv1.getText()+"\nName : " + getValue("name", element2)+"\n");

                    String id = getValue("id", element2);
                    a = Integer.parseInt(id);
                    String idd = getValue("quantita", element2);
                    b = Integer.parseInt(idd);


                    System.out.println("XMLLLLLLLLLL:" + b);

                    hm.add(a);
                    hm_quantitàpizze.add(b);

                    System.out.println("AZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ:" + hm_quantitàpizze);
                    System.out.println("LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:" + hm);






                }

            }
            Bundle bundle = new Bundle();
            bundle.putIntegerArrayList("oki", hm);
            bundle.putIntegerArrayList("okiquantitapizze", hm_quantitàpizze);

            System.out.println("PERO:" + bundle);


            MyListFragment2 myFragment = MyListFragment2.newInstance(hm,hm_quantitàpizze);
            FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
            //transaction.replace(android.R.id.content, myFragment);
            transaction.replace(R.id.crisbio, myFragment);

            transaction.commit();


        }

       numero_tavolo_text_view.setText(numero_tavolo);
    }




    private static String getValue(String tag, Element element) {
        NodeList nodeList = element.getElementsByTagName(tag).item(0).getChildNodes();
        Node node = nodeList.item(0);
        return node.getNodeValue();
    }
/*cazzo.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
               // logoutUser();
            }
        });*//*



      //  s = getIntent().getIntExtra("EXTRA_SESSION_ID",0);
       // System.out.println("IDDDDDDD" + s);

       // getMyData();
*/
/*
        Intent intent = getIntent();

        arraylistInteger = intent.getIntegerArrayListExtra("oki");
        Bundle bundle = new Bundle();
        bundle.putIntegerArrayList("oki", arraylistInteger);

        Fragment fragment = new MyListFragment();
        fragment.setArguments(bundle);


        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.container, fragment);
        transaction.commit();
        System.out.println("PASSATO " + bundle);*//*

    }



   */
/* public int getMyData() {
        return s;

    }*//*



*/
/*    private void logoutUser() {

        Intent intent = new Intent();
        intent.setPackage("com.asus.filemanager");
        intent.setType("text/xml");
        intent.setAction(Intent.ACTION_GET_CONTENT);
        startActivityForResult(Intent.createChooser(intent, "LOGOUT"), 1);
    }
    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

      *//*
*/
/*  Intent intent = new Intent(ScrollableTabsActivity.this,
                ScrollableTabsActivity.class);

        startActivity(intent);*//*
*/
/*

        filePath = data.getData();
        System.out.println("FILEPATH" + filePath);


        path = FilePath.getPath(this, filePath);

        System.out.println("PATH" + path);

        int a=0;
        String status="";
        boolean statuss = false;
        String intenttt= path;

        System.out.println("INTENT:"+intenttt);



        file = new File(intenttt);
        System.out.println("FILE:"+file);

        FileInputStream is = null;
        try {
            is = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

        DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder dBuilder = null;
        try {
            dBuilder = dbFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            e.printStackTrace();
        }
        Document doc = null;
        try {
            doc = dBuilder.parse(is);
        } catch (SAXException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

        Element element = doc.getDocumentElement();
        element.normalize();

        NodeList nList = doc.getElementsByTagName("checkboxes_pizza");

        for (int i = 0; i < nList.getLength(); i++) {
            Node node = nList.item(i);
            if (node.getNodeType() == Node.ELEMENT_NODE) {
                Element element2 = (Element) node;
                //tv1.setText(tv1.getText()+"\nName : " + getValue("name", element2)+"\n");

                String id = getValue("id", element2);
                a = Integer.parseInt(id);
                status = getValue("status", element2);

                statuss= Boolean.parseBoolean(status);

                System.out.println("XML:" + a);
                hm.clear();

                hm.add(a);

                System.out.println("AZZ:" + hm);





            }

        }



        Bundle bundle = new Bundle();
        bundle.putIntegerArrayList("oki", hm);

        Fragment fragment = new MyListFragment();
        fragment.setArguments(bundle);


        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.container, fragment);
        transaction.commit();
        System.out.println("PASSATO " + bundle);


    }*//*



    private static String getValue(String tag, Element element) {
        NodeList nodeList = element.getElementsByTagName(tag).item(0).getChildNodes();
        Node node = nodeList.item(0);
        return node.getNodeValue();
    }



   */
/* @Override
    protected void onPause() {
        super.onPause();
        logoutUser();
    }*/


    private void setupViewPager(ViewPager viewPager) {
        //ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());
        ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());

        adapter.addFrag(new MyListFragment2(), "PIZZE");
        // adapter.addFrag(new SixFragment2(), "SIX");
        //adapter.addFrag(new FiveFragment2(), "TAVOLI");
        adapter.addFrag(new ThreeFragment2(), "BEVANDE");
        adapter.addFrag(new FourFragment2(), "STAMPA");
       // adapter.addFrag(new TwoFragment2(), "TWO");
        //adapter.addFrag(new SevenFragment2(), "SEVEN");
        //adapter.addFrag(new EightFragment2(), "EIGHT");
        //adapter.addFrag(new NineFragment2(), "NINE");
        //adapter.addFrag(new TenFragment2(), "TEN");


        viewPager.setAdapter(adapter);
        viewPager.setOffscreenPageLimit(10);
    }




    class ViewPagerAdapter extends FragmentPagerAdapter {
        private final List<Fragment> mFragmentList = new ArrayList<>();
        private final List<String> mFragmentTitleList = new ArrayList<>();

        public ViewPagerAdapter(FragmentManager manager) {
            super(manager);
        }

        @Override
        public Fragment getItem(int position) {
            return mFragmentList.get(position);
        }

        @Override
        public int getCount() {
            return mFragmentList.size();
        }

        public void addFrag(Fragment fragment, String title) {
            mFragmentList.add(fragment);
            mFragmentTitleList.add(title);
        }

        @Override
        public CharSequence getPageTitle(int position) {
            return mFragmentTitleList.get(position);
        }
    }


}
公共类ScrollableTabsActivity2扩展了AppCompativeActivity{
专用工具栏;
私人摊位摊位;
私人视页机视页机;
私人按钮卡佐;
//私有SQLiteHandler数据库;
私人会话管理器会话;
私有文本视图txtName;
私有文本视图txtEmail;
int-s;
字符串intent=“”;
文件;
Uri文件路径;
ListView lv;
ArrayList hm=新的ArrayList();
字符串路径=null;
ArrayList planetList=新的ArrayList();
私有字符串myString=“azz”;
ArrayList arraylistInteger;
字符串值=”;
字符串numero_tavolo=“”;
ArrayList hm3=新的ArrayList();
ArrayList hm_quantitápizze=新ArrayList();
文本视图数字视图;
@凌驾
创建时受保护的void(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity\u scrollable\u tabs2);
toolbar=(toolbar)findviewbyd(R.id.toolbar);
设置支持操作栏(工具栏);
txtName=(TextView)findViewById(R.id.name);
txtEmail=(TextView)findViewById(R.id.numero_telefonico);
numero_tavolo_text_view=(TextView)findViewById(R.id.numero_tavolo);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
viewPager=(viewPager)findViewById(R.id.viewpagerr);
设置viewPager(viewPager);
tabLayout=(tabLayout)findviewbyd(R.id.tabss);
tabLayout.setupWithViewPager(viewPager);
Bundle extras=getIntent().getExtras();
如果(附加值!=null){
value=extras.getString(“路径文件DA AGGIORNARE”);
numero_tavolo=extras.getString(“numero_tavolo”);
文件=新文件(值);
System.out.println(“文件:”+文件);
FileInputStream为空;
试一试{
is=新文件输入流(文件);
}catch(filenotfounde异常){
e、 printStackTrace();
}
DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder=null;
试一试{
dBuilder=dbFactory.newDocumentBuilder();
}捕获(ParserConfiguration异常e){
e、 printStackTrace();
}
单据单据=空;
试一试{
doc=dBuilder.parse(is);
}捕获(SAXE异常){
e、 printStackTrace();
}捕获(IOE异常){
e、 printStackTrace();
}
Element=doc.getDocumentElement();
元素。normalize();
INTA;
int b;
NodeList nList=doc.getElementsByTagName(“复选框”);
hm.clear();
hm_quantitápizze.clear();
对于(int i=0;ipublic  class ScrollableTabsActivity2 extends AppCompatActivity {

    private Toolbar toolbar;
    private TabLayout tabLayout;
    private ViewPager viewPager;
    private Button cazzo;
    //private SQLiteHandler db;
    private SessionManager session;
    private TextView txtName;
    private TextView txtEmail;
    int s;
    String intentt="";
    File file;
    Uri filePath;
    ListView lv;
    ArrayList<Integer> hm=new ArrayList<>();
    String path=null;
    ArrayList<Planet> planetList=new ArrayList();

    private String myString = "azz";
     ArrayList<Integer> arraylistInteger;
    String value="";
    String numero_tavolo="";
    ArrayList<Integer> hm3=new ArrayList<>();
    ArrayList<Integer> hm_quantitàpizze=new ArrayList<>();
    TextView numero_tavolo_text_view;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_scrollable_tabs2);


        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        txtName = (TextView) findViewById(R.id.name);
        txtEmail = (TextView) findViewById(R.id.numero_telefonico);
        numero_tavolo_text_view=(TextView)findViewById(R.id.numero_tavolo);



        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        viewPager = (ViewPager) findViewById(R.id.viewpagerr);
        setupViewPager(viewPager);

        tabLayout = (TabLayout) findViewById(R.id.tabss);
        tabLayout.setupWithViewPager(viewPager);


        Bundle extras = getIntent().getExtras();
        if (extras != null) {
             value = extras.getString("PATH FILE DA AGGIORNARE");
            numero_tavolo=extras.getString("NUMERO_TAVOLO");
            file = new File(value);
            System.out.println("FILE:" + file);

            FileInputStream is = null;
            try {
                is = new FileInputStream(file);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }

            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder dBuilder = null;
            try {
                dBuilder = dbFactory.newDocumentBuilder();
            } catch (ParserConfigurationException e) {
                e.printStackTrace();
            }
            Document doc = null;
            try {
                doc = dBuilder.parse(is);
            } catch (SAXException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }

            Element element = doc.getDocumentElement();
            element.normalize();

            int a;
            int b;
            NodeList nList = doc.getElementsByTagName("checkboxes_pizza");
            hm.clear();
            hm_quantitàpizze.clear();

            for (int i = 0; i < nList.getLength(); i++) {
                Node node = nList.item(i);

                if (node.getNodeType() == Node.ELEMENT_NODE) {
                    Element element2 = (Element) node;
                    //tv1.setText(tv1.getText()+"\nName : " + getValue("name", element2)+"\n");

                    String id = getValue("id", element2);
                    a = Integer.parseInt(id);
                    String idd = getValue("quantita", element2);
                    b = Integer.parseInt(idd);


                    System.out.println("XMLLLLLLLLLL:" + b);

                    hm.add(a);
                    hm_quantitàpizze.add(b);

                    System.out.println("AZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ:" + hm_quantitàpizze);
                    System.out.println("LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:" + hm);






                }

            }
            Bundle bundle = new Bundle();
            bundle.putIntegerArrayList("oki", hm);
            bundle.putIntegerArrayList("okiquantitapizze", hm_quantitàpizze);

            System.out.println("PERO:" + bundle);


            MyListFragment2 myFragment = MyListFragment2.newInstance(hm,hm_quantitàpizze);
            FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
            //transaction.replace(android.R.id.content, myFragment);
            transaction.replace(R.id.crisbio, myFragment);

            transaction.commit();


        }

       numero_tavolo_text_view.setText(numero_tavolo);
    }




    private static String getValue(String tag, Element element) {
        NodeList nodeList = element.getElementsByTagName(tag).item(0).getChildNodes();
        Node node = nodeList.item(0);
        return node.getNodeValue();
    }
/*cazzo.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
               // logoutUser();
            }
        });*//*



      //  s = getIntent().getIntExtra("EXTRA_SESSION_ID",0);
       // System.out.println("IDDDDDDD" + s);

       // getMyData();
*/
/*
        Intent intent = getIntent();

        arraylistInteger = intent.getIntegerArrayListExtra("oki");
        Bundle bundle = new Bundle();
        bundle.putIntegerArrayList("oki", arraylistInteger);

        Fragment fragment = new MyListFragment();
        fragment.setArguments(bundle);


        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.container, fragment);
        transaction.commit();
        System.out.println("PASSATO " + bundle);*//*

    }



   */
/* public int getMyData() {
        return s;

    }*//*



*/
/*    private void logoutUser() {

        Intent intent = new Intent();
        intent.setPackage("com.asus.filemanager");
        intent.setType("text/xml");
        intent.setAction(Intent.ACTION_GET_CONTENT);
        startActivityForResult(Intent.createChooser(intent, "LOGOUT"), 1);
    }
    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

      *//*
*/
/*  Intent intent = new Intent(ScrollableTabsActivity.this,
                ScrollableTabsActivity.class);

        startActivity(intent);*//*
*/
/*

        filePath = data.getData();
        System.out.println("FILEPATH" + filePath);


        path = FilePath.getPath(this, filePath);

        System.out.println("PATH" + path);

        int a=0;
        String status="";
        boolean statuss = false;
        String intenttt= path;

        System.out.println("INTENT:"+intenttt);



        file = new File(intenttt);
        System.out.println("FILE:"+file);

        FileInputStream is = null;
        try {
            is = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

        DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder dBuilder = null;
        try {
            dBuilder = dbFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            e.printStackTrace();
        }
        Document doc = null;
        try {
            doc = dBuilder.parse(is);
        } catch (SAXException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

        Element element = doc.getDocumentElement();
        element.normalize();

        NodeList nList = doc.getElementsByTagName("checkboxes_pizza");

        for (int i = 0; i < nList.getLength(); i++) {
            Node node = nList.item(i);
            if (node.getNodeType() == Node.ELEMENT_NODE) {
                Element element2 = (Element) node;
                //tv1.setText(tv1.getText()+"\nName : " + getValue("name", element2)+"\n");

                String id = getValue("id", element2);
                a = Integer.parseInt(id);
                status = getValue("status", element2);

                statuss= Boolean.parseBoolean(status);

                System.out.println("XML:" + a);
                hm.clear();

                hm.add(a);

                System.out.println("AZZ:" + hm);





            }

        }



        Bundle bundle = new Bundle();
        bundle.putIntegerArrayList("oki", hm);

        Fragment fragment = new MyListFragment();
        fragment.setArguments(bundle);


        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.container, fragment);
        transaction.commit();
        System.out.println("PASSATO " + bundle);


    }*//*



    private static String getValue(String tag, Element element) {
        NodeList nodeList = element.getElementsByTagName(tag).item(0).getChildNodes();
        Node node = nodeList.item(0);
        return node.getNodeValue();
    }



   */
/* @Override
    protected void onPause() {
        super.onPause();
        logoutUser();
    }*/


    private void setupViewPager(ViewPager viewPager) {
        //ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());
        ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());

        adapter.addFrag(new MyListFragment2(), "PIZZE");
        // adapter.addFrag(new SixFragment2(), "SIX");
        //adapter.addFrag(new FiveFragment2(), "TAVOLI");
        adapter.addFrag(new ThreeFragment2(), "BEVANDE");
        adapter.addFrag(new FourFragment2(), "STAMPA");
       // adapter.addFrag(new TwoFragment2(), "TWO");
        //adapter.addFrag(new SevenFragment2(), "SEVEN");
        //adapter.addFrag(new EightFragment2(), "EIGHT");
        //adapter.addFrag(new NineFragment2(), "NINE");
        //adapter.addFrag(new TenFragment2(), "TEN");


        viewPager.setAdapter(adapter);
        viewPager.setOffscreenPageLimit(10);
    }




    class ViewPagerAdapter extends FragmentPagerAdapter {
        private final List<Fragment> mFragmentList = new ArrayList<>();
        private final List<String> mFragmentTitleList = new ArrayList<>();

        public ViewPagerAdapter(FragmentManager manager) {
            super(manager);
        }

        @Override
        public Fragment getItem(int position) {
            return mFragmentList.get(position);
        }

        @Override
        public int getCount() {
            return mFragmentList.size();
        }

        public void addFrag(Fragment fragment, String title) {
            mFragmentList.add(fragment);
            mFragmentTitleList.add(title);
        }

        @Override
        public CharSequence getPageTitle(int position) {
            return mFragmentTitleList.get(position);
        }
    }


}
  Fragment fragment = new MyListFragment2();
  FragmentManager fm = getSupportFragmentManager();
  FragmentTransaction ft = fm.beginTransaction();
  ft.replace(R.id.acab, fragment);
  ft.commit();