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 7159747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:16:57+00:00 2026-05-28T13:16:57+00:00

I am having this error android.widget.LinearLayout$LayoutParams. When using this code. public void modifyingTextViews(){//This sets

  • 0

I am having this error android.widget.LinearLayout$LayoutParams.

When using this code.

public void modifyingTextViews(){//This sets up a margin for the textviews.
        LinearLayout.LayoutParams llp = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
        llp.setMargins(0, 30, 0, 30);
        textview1.setLayoutParams(llp);
        textview2.setLayoutParams(llp);
    }

It conflicts with my touch methods or my load methods which consists of view flipper with 2 textview and a loader.

From what I understand from a guy with a similar issue is that it is because I am getting this error probably because of the arrangement of the view.

Now My question is how would I be able to tell which is my main view on a view flipper if I have different xmls. Also if there would be a quick fix to the problem that would be appreciated as well.

  • 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-05-28T13:16:58+00:00Added an answer on May 28, 2026 at 1:16 pm

    I can’t tell what the issue is without knowing more (your xml code would be a start). Since you asked for an easy fix… I would just define everything in XML. That way everything is organized and you don’t have to worry about setting LayoutParams at runtime.

    <ViewFlipper android:id="@+id/flipper"
        android:layout_width="match_parent" 
        android:layout_height="match_parent">
    
        <!-- layout #1 -->
        <LinearLayout android:layout_width="match_parent"
            android:layout_height="match_parent" >
    
            <TextView android:id="@+id/textview1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
    
        </LinearLayout>
    
        <!-- layout #2 -->
        <LinearLayout android:layout_width="match_parent"
            android:layout_height="match_parent" >
    
            <TextView android:id="@+id/textview2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
    
        </LinearLayout>
    
        <!-- fill in the rest here -->
    
    </ViewFlipper>
    

    Of course, this is a hypothetical example and you’ll have to write the XML code to get the layout you want, but hopefully this gives you a good idea of where to start. Once you get it all set up, initializing the layout is simply a matter of calling setContentView() in your onCreate() method.

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

Sidebar

Related Questions

Having this code: using (BinaryWriter writer = new BinaryWriter(File.Open(ProjectPath, FileMode.Create))) { //save something here
I am having this error in my j2ee web application. java.sql.SQLException: ORA-00604: error occurred
I`m having the following error . Why am I having this error and how
I am having this bizarre error and I don't know what to do. This
I'm having an issue integrating flex with ruby on rails. I get this error:
I'm having trouble with this PHP script where I get the error Fatal error
I'm having trouble overriding a ModelForm save method. This is the error I'm receiving:
What is wrong with this statement? I`m having the following error: Error 10 'System.Web.Mvc.HtmlHelper'
So I'm having pretty much exactly the problem described here: http://code.google.com/p/android/issues/detail?id=6191 and until the
I am using the following code to display a video file in the android

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.