Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:09:50+00:00 2026-06-10T04:09:50+00:00

I am trying to update this LinearLayout but I am getting a null value.

  • 0

I am trying to update this LinearLayout but I am getting a null value. Can someone tell me why?

Java:

public class MenuTabFragment extends Fragment {

    private final static String TAG = MenuTabFragment.class.getSimpleName();



    private int[] menuButtons = { R.drawable.breakfast_btn,
            R.drawable.lunch_btn, R.drawable.dinner_btn, R.drawable.drinks_btn,
            R.drawable.appetizers_btn, R.drawable.dessert_btn,
            R.drawable.sides_btn };

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {


        View view = inflater.inflate(R.layout.menutabslayout, container, false);
            //this is a null value
        LinearLayout linLayout = (LinearLayout) getActivity().findViewById(R.id.menuTabs);
        Log.i(TAG, linLayout + ": linLayout" ); 

XML:

<LinearLayout
    android:id="@+id/menuTabs"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >
</LinearLayout>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:09:51+00:00Added an answer on June 10, 2026 at 4:09 am

    Try LinearLayout linLayout = (LinearLayout) view.findViewById(R.id.menuTabs);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to update code via Linq, but I am getting this error:
Trying this: - UPDATE -- SOOORRY! <li><a href=index.php class=first>Home</a></li> <?php if (the_title() == language-translation)
I am trying this update statement using a case in MySQL, but It does
I am trying update text views while this loop is processing. Here is my
I'm trying to update/change contact ringtone using this code: ContentValues values = new ContentValues();
I am trying to update a table according to this trigger: CREATE TRIGGER alert
I am trying to Update the SSL certificate in accordance with this post .
I'm trying to update my text area via ActionScript code using this: scoreLabel.text =
I have a problem when trying to execute this update statement (below) using C#
I'm trying to update my ObservableCollection as the FileSystemWatcher notifies changes. I know this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.