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

  • Home
  • SEARCH
  • 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 8106685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:32:13+00:00 2026-06-06T00:32:13+00:00

i need some help in addition to android-layouts. For eyample: Actually I use a

  • 0

i need some help in addition to android-layouts.
For eyample:

Actually I use a view called daily.xml.These view contains a flipper, which is filled programmatically with 5 ListViews to flip around if the user want to.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/background">

    <de.oszimtcc.timetableview.TimetableFlipperView
        android:id="@+id/flipper"
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:layout_margin="20dp"
        android:background="@android:color/transparent"
        android:cacheColorHint="@android:color/transparent" >
    </de.oszimtcc.timetableview.TimetableFlipperView>
</LinearLayout>

Flipper in TimetableScreen.java

    activity.setContentView(R.layout.daily);
    Log.i(TimetableApplication.LOG_TAG,"Start create Timetable-Aplication");
    activity.setContentView(R.layout.daily);   

    activity.inflater = LayoutInflater.from(this.activity);     
    flipper = (TimetableFlipperView) activity.findViewById(R.id.flipper); 
    dayListView = (ListView) activity.findViewById(R.id.dayListView);
    flipper.AddContent(**Content to show **);

Now, I want to add a landscapemode.In these mode i won’t hava such flipper, cause there is enough space to show all ListViews on a horizontal linear layout.So i created a layout-land Resource-Folder an add another daily.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:background="@drawable/background">

<de.oszimtcc.timetableview.BlockListView
    android:id="@+id/dayListViewMonday"
    android:layout_width="wrap_content"
    android:layout_height="match_parent" 
    android:padding="5dp"
    android:listSelector="@drawable/day_selector"
    android:background="@android:color/transparent"
android:cacheColorHint="@android:color/transparent">
</de.oszimtcc.timetableview.BlockListView>

...the same ListView again for 4 times, with different android:id...

</LinearLayout>

But how can i handle this into my TimetableScreen.java Class?Because there is no flipper i can’t use my default-constructor to init the class.Should I call different methods every time the onCreate is called or is there any nicer possibility to handle it?

Thanks a lot Kooki!

  • 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-06T00:32:15+00:00Added an answer on June 6, 2026 at 12:32 am

    You could use getResources().getConfiguration().orientation, in order to find out the screen orientation. If its a landscape mode, dont initialize the flipper variable.
    I just added one line in your code, check the if control statement.

     activity.setContentView(R.layout.daily);
    Log.i(TimetableApplication.LOG_TAG,"Start create Timetable-Aplication");
    activity.setContentView(R.layout.daily);   
    
    if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_POTRAIT) {   //Check this statement
    activity.inflater = LayoutInflater.from(this.activity);     
    flipper = (TimetableFlipperView) activity.findViewById(R.id.flipper); 
    dayListView = (ListView) activity.findViewById(R.id.dayListView);
    flipper.AddContent(**Content to show **);
    } else {
    //Code for Landscape mode
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview
Need some help with this problem in implementing with XSLT, I had already implemented
Need some help gathering thoughts on this issue. Our team is moving ahead with
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
Need some help assigning a mouseover event to display some icons that start out
Need some help with a query.. I have three tables. Source id name 1
Need some help with DataFormatString in GridView. I have a Double value that needs
I need some help with a textbox: The textbox is only allowed to contain
I need some help about WCF and authorization. Currently I have a client which

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.