反应本机navigation3我想隐藏底部标签导航的一个标签

时间:2019-07-05 09:45:08

标签: reactjs react-native react-navigation

enter image description here

我想隐藏在图片中以黄色突出显示的标签。

该怎么做?

我的代码:

const MainBottomTab = createBottomTabNavigator({
  HomeStack : {
    screen : HomeStack,
    navigationOptions : {
      showlabel:false,
      drawerLabel:NullComponent
    }
  } ,
  SettingsStack,
  },{
  tabBarPosition:"bottom",
  navigationOptions:{

  },
  tabBarOptions:{

activeTintColor: "green",
inactiveTintColor: "#00ccff",
style:{
  backgroundColor: "white"
},
indicatorStyle:{
  height: 0
},
showIcon:'true'


},
 swipeEnabled:true,
});

1 个答案:

答案 0 :(得分:0)

使用自定义TabIcon

1 Introduction
  1.1 aa
  1.2 bb
  1.3 cc
2 Laws
  2.1 ww
  2.2 www
  2.3 wwww
  2.4 wwww

private void viewunitandpointname()
{
    StringRequest stringRequest = new StringRequest(Request.Method.POST, EndPoints.SYLLABUS_VIEW_UNIT_AND_POINT, new Response.Listener<String>()
    {
        @Override
        public void onResponse(String response)
        {
            try {
                JSONObject obj = new JSONObject(response);
                JSONArray jsonArray = obj.getJSONArray("data");
                pdfList.clear();





                for (int i = 0; i < jsonArray.length(); i++)
                {
                    //Declaring a json object corresponding to every pdf object in our json array
                    JSONObject jsonObject = jsonArray.getJSONObject(i);

                    SyallbusList tlist = new SyallbusList();

                    String unit_no = jsonObject.getString("unit_no");
                    String unit_name = jsonObject.getString("unit_name");
                    String unit_point_no = jsonObject.getString("unitpointno");
                    String unit_point_name = jsonObject.getString("unitpointname");
                    String classname = jsonObject.getString("classname");
                    String subjname = jsonObject.getString("subjname");
                    String acyearname = jsonObject.getString("acyearname");

                    tlist.setUnitno(unit_no);
                    tlist.setUnitName(unit_name);
                    tlist.setpointno(unit_point_no);
                    tlist.setpointname(unit_point_name);
                    tlist.setClasname(classname);
                    tlist.setsubjectname(subjname);
                    tlist.setacyear(acyearname);

                    pdfList.add(tlist);


                }
                pdfAdapter=new SyllabusCompleListAdapter(getActivity(),R.layout.syllabus_row,pdfList);
                listView.setAdapter(pdfAdapter);
                pdfAdapter.notifyDataSetChanged();

            } catch (JSONException e) {
                e.printStackTrace();
            }

        }
    },
            new Response.ErrorListener()
            {
                @Override
                public void onErrorResponse(VolleyError error)
                {
                    // error
                    //Log.d("Error.Response", error.toString());
                }
            }

    ) {

        @Override
        protected Map<String, String> getParams()
        {
            Map<String, String> params = new HashMap<>();
            params.put("acyear_id",academicyaerId);
            params.put("subj_id", subject_id);


            return params;
        }

    };

    RequestQueue request = Volley.newRequestQueue(getContext());
    request.add(stringRequest);
}