I have a navigation drawer with 3 items. When I click on Item 1 I need it to show me an edit text for example and when I click on item 2 or 3 I need it to hide what's been showing and display something else, something belongs to item 2 and item 3.
I tried with Toast messages at first on every item and it worked well but when I made an edit text and made it visible once you click on item 1, it shows me that edit text but when I go back and click on item 2 or item 3 to hide item 1's edit text nothing happens at all.. It seems like the drawer stopped responding, I don't know .
Here is my xml code :
<com.google.android.material.navigation.NavigationView
android:id="#+id/drawer_nav"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#color/black"
app:menu="#menu/navigation"
app:itemTextColor="#color/white"
app:itemIconTint="#color/white"
android:layout_gravity="start"
/>
<com.google.android.material.textfield.TextInputLayout
android:id="#+id/txtSummary"
android:layout_width="200dp"
android:visibility="gone"
android:layout_height="200dp"
android:gravity="top">
<com.google.android.material.textfield.TextInputEditText
android:id="#+id/inputET"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:gravity="right"
android:scrollIndicators="left"
android:textColor="#color/black"
android:background="#color/white"
android:inputType="textMultiLine"/>
</com.google.android.material.textfield.TextInputLayout>
And this is my Java code :
txtSummary = findViewById(R.id.txtSummary);
textInputEditText = findViewById(R.id.inputET);
navigationView = findViewById(R.id.drawer_nav);
#Override
public boolean onNavigationItemSelected(#NonNull MenuItem item) {
switch (item.getItemId()){
case R.id.item1:
Toast.makeText(getApplication()," Item 1 icon has been clicked ",Toast.LENGTH_LONG).show();
txtSummary.setVisibility(View.VISIBLE);
textInputEditText.setVisibility(View.VISIBLE);
return true;
case R.id.item2:
txtSummary.setVisibility(View.GONE);
textInputEditText.setVisibility(View.GONE);
Toast.makeText(getApplication()," Item 2 icon has been clicked ",Toast.LENGTH_LONG).show();
return true;
case R.id.item3:
txtSummary.setVisibility(View.GONE);
textInputEditText.setVisibility(View.GONE);
Toast.makeText(getApplication()," Item 3 icon has been clicked ",Toast.LENGTH_LONG).show();
return true;
}
return true;
}
});```
Try to change your layout code. Put your edit text inside any other layout. Take reference from below code
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/my_drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputLayout
android:id="#+id/txtSummary"
android:layout_width="200dp"
android:layout_height="200dp"
android:gravity="top"
android:visibility="gone">
<com.google.android.material.textfield.TextInputEditText
android:id="#+id/inputET"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:background="#color/white"
android:gravity="right"
android:inputType="textMultiLine"
android:scrollIndicators="left"
android:textColor="#color/black" />
</com.google.android.material.textfield.TextInputLayout>
</FrameLayout>
<com.google.android.material.navigation.NavigationView
android:id="#+id/drawer_nav"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:menu="#menu/navigation" />
</androidx.drawerlayout.widget.DrawerLayout>
Related
I am having an issue with nested scroll view when reach bottom.
Inside nestedScrollView I have a button, in bottom of page I have a input field to enter phone number. When press button, if phone number filed not filled, I want to scroll to Bottom of Activity to highlight input field.
But in my activity it scrolling only half, not scrolling till end.
I tried all beloved java codes to fix this issue, but all works same (Not reaching bottom, stops on middle).
Java Codes
CoordinatorLayout mainCoordinate = findViewById(R.id.mainCoordinate);
NestedScrollView nestedScrollView = findViewById(R.id.nestedScroll);
1.
//Scroll to bottom of view
nestedScrollView.post(new Runnable() {
#Override
public void run() {
nestedScrollView.smoothScrollTo(0, mainCoordinate.getBottom());
}
});
2.
//Scroll to bottom of view
nestedScrollView.post(new Runnable() {
#Override
public void run() {
nestedScrollView.fullScroll(View.FOCUS_DOWN);
}
});
3.
nestedScrollView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
#Override
public void onGlobalLayout() {
final int scrollViewHeight = nestedScrollView.getHeight();
if (scrollViewHeight > 0) {
nestedScrollView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
final View lastView = nestedScrollView.getChildAt(nestedScrollView.getChildCount() - 1);
final int lastViewBottom = lastView.getBottom() + nestedScrollView.getPaddingBottom();
final int deltaScrollY = lastViewBottom - scrollViewHeight - nestedScrollView.getScrollY();
/* If you want to see the scroll animation, call this. */
nestedScrollView.smoothScrollBy(0, deltaScrollY);
/* If you don't want, call this. */
nestedScrollView.scrollBy(0, deltaScrollY);
}
}
});
XML Codes
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/mainCoordinate"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/colorPrimary"
tools:ignore="RtlHardcoded">
<android.support.design.widget.AppBarLayout
android:id="#+id/flexibleAppbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:visibility="invisible">
<android.support.design.widget.CollapsingToolbarLayout
android:id="#+id/flexible.example.collapsing"
android:layout_width="match_parent"
android:layout_height="258dp"
app:contentScrim="?colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<ImageView
android:id="#+id/imageMain"
android:layout_width="match_parent"
android:layout_height="258dp"
android:foreground="#drawable/ripple_effect_circle_card"
android:src="#drawable/back_button_white" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id="#+id/nestedScroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible"
app:behavior_overlapTop="48dp"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="#+id/main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:fitsSystemWindows="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical">
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="#+id/price.card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_anchorGravity="bottom"
card_view:cardBackgroundColor="#color/card_back"
card_view:cardCornerRadius="4dp"
card_view:contentPadding="8dp">
.........................
.........................
.........................
//My Other All Views
.........................
.........................
.........................
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="#+id/profile.card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_anchorGravity="bottom"
card_view:cardBackgroundColor="#color/card_back"
card_view:cardCornerRadius="4dp"
card_view:contentPadding="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start"
android:padding="5dp"
android:text="Phone No." />
<EditText
android:id="#+id/etPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="end"
android:hint="Enter your phone"
android:inputType="phone"
android:text=""/>
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<Button
android:id="#+id/btnBookNow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button"/>
</android.support.design.widget.CoordinatorLayout>
I attached a video that explains my exact problem link
Please, Does anyone having a better way or other suggestion to fix this issue?
Thanks in Advance
Pls try Android layout inspector to check height of your NestedScroll.
Try to add
android:layout_gravity="bottom|center" to Button.
In NestedScrollView set layout heigh to android:layout_height="wrap_content"
I need to allow user to CLICK anywhere on the screen, so I've implemented onClick listener for mainLayout and it worked great.
But the problem is I've got to add a scrollview inside mainLayout to support small screen sizes and after adding scrollview, it blocks the parentLayout (in my case mainLayout) CLICK EVENT.
Just to exaplin this, a sample layout is as follows.
<!-- MAIN LAYOUT WHERE I NEED
THE CLICK EVENT-->
<LinearLayout
android:id="#+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#bebebe"
android:orientation="vertical"
android:onClick="onClick_MainLayout">
<ScrollView
android:id="#+id/mainScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="#+id/button1"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="TEST BUTTON 1"
android:onClick="onClick_Button1"/>
<Button
android:id="#+id/button2"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="TEST BUTTON 2"
android:onClick="onClick_Button2"/>
<TextView
android:id="#+id/textview1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Text View"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
I searched for this and found various ideas like disableing onClick manually in all other views inside scrollview etc but non of them works.
NOTE: I tried both implementing onClick listener manually in java and adding android:onClick="onClick_MainLayout" in to layout. Both the same.
EDITS ----------------------
All the changes I've done as you (#IntelliJ Amiya) mentioned is as below. Please let me know anything is missing.
<RelativeLayout
android:id="#+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#bebebe">
<ScrollView
android:id="#+id/mainScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="#+id/button1"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="TEST BUTTON 1"/>
<Button
android:id="#+id/button2"
android:layout_below="#+id/button1"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="TEST BUTTON 2"/>
<TextView
android:id="#+id/textview1"
android:layout_below="#+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Text View"/>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
And in on create
findViewById(R.id.mainLayout).setOnClickListener(new View.OnClickListener()
{
#Override
public void onClick(View v)
{
Log.v("MyLogs", "Click Event Fires...");
}
});
Your Scroll view overlaps the linear layout i.e #mainLayout,so
set its height to wrap content
then you can perform onclick for both scroll view buttons and mainlayout.
Pls tell me if i wrong.
<ScrollView
android:id="#+id/mainScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="#+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#bebebe"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView
android:id="#+id/mainScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="#+id/button1"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="TEST BUTTON 1"
android:onClick="onClick_Button1"/>
<Button
android:id="#+id/button2"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="TEST BUTTON 2"
android:onClick="onClick_Button2"/>
<TextView
android:id="#+id/textview1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Text View"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
JAVA
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void onClick_Button1(View v)
{
Toast.makeText(this, "1ST Button Click", Toast.LENGTH_SHORT).show();
}
public void onClick_Button2(View v)
{
Toast.makeText(this, "2ND Button Click", Toast.LENGTH_SHORT).show();
}
}
I am working on android Tv, In our Fragment there the two Horizontal Recyclerview, when I scroll First Recyclerview using D-pad in Right direction, it scrolls well and when I come to last focus item of its Recycler view, Focus automatically goes down to second Recycler view item.
How to prevent this?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/firstRelativeGrid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="#+id/gridView1"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:clipToPadding="false"
android:focusable="false"
android:paddingLeft="0dp"
android:paddingRight="755dp" />
<android.support.v7.widget.RecyclerView
android:id="#+id/gridView2"
android:layout_width="155dp"
android:layout_height="200dp"
android:layout_alignBaseline="#+id/gridView1"
android:layout_marginLeft="0dp"
android:focusable="false"
android:nextFocusRight="#null"
android:nextFocusUp="#+id/home_textview" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/secondRelativeGrid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="false"
android:focusableInTouchMode="false"
android:orientation="vertical">
<android.support.v17.leanback.widget.MyHorizontalGridView
android:id="#+id/gridView3"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:clipToPadding="false"
android:focusable="false"
android:paddingLeft="0dp"
android:paddingRight="754dp" />
<android.support.v17.leanback.widget.MyHorizontalGridView
android:id="#+id/gridView4"
android:layout_width="155dp"
android:layout_height="200dp"
android:layout_alignBaseline="#+id/gridView3"
android:layout_marginLeft="0dp"
android:clipToPadding="false"
android:descendantFocusability="blocksDescendants"
android:focusable="false"
android:paddingLeft="0dp"
android:paddingRight="-2dp"
/>
</RelativeLayout>
It might be late but for any one still looking for solution:
You should write your own logic while searching for next focus happens and supply the last view as next focus item if in the end of list OR you may modify the logic according to your needs. For Ex:
override fun onInterceptFocusSearch(focused: View?, direction: Int): View? {
val position = getPosition(focused)
val count = itemCount
lastKnownPosition = position
return if (position == count - 1 && direction == View.FOCUS_RIGHT) {
focused
} else {
super.onInterceptFocusSearch(focused, direction)
}
}
And this method will be part of your layout manager.
try setting the focusable attribute of the recyclerview to false
recyclerview.setFocusable(false);
I am posting this answer very late , but there is one way you can do it is , in Adapter class check if the item is first , and set the nextFocusLeftId to itself.
for example.
itemview.setnextFocusLeftId(itemview.gedId)
do the same for the last element of the recycler view.
I have a button with an ImageView as overlay. The ImageView is not clickable so I can still use the button. Strangely the not clickable ImageView turns invisible when I touch the button and appears again when I release it.
<RelativeLayout
android:id="#+id/buttonMailLayout"
android:layout_width="208dp"
android:layout_height="160dp"
android:layout_centerHorizontal="true">
<Button
android:id="#+id/buttonMail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/metal"
android:text="Write Mail"
android:textSize="32dp"
android:gravity="bottom|center_horizontal"
android:paddingBottom="16dp"/>
<ImageView
android:id="#+id/imageMail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="#drawable/email20"
android:elevation="2dp"
android:paddingTop="8dp"
android:paddingBottom="64dp"
android:clickable="false"/>
</RelativeLayout>
Here is the code I work with:
Button buttonMail = (Button) this.findViewById(R.id.buttonMail);
buttonMail.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View arg0) {
Toast.makeText(getApplicationContext(), "New Mail to : " + p._email,
Toast.LENGTH_SHORT).show();
}
});
Any ideas what is going wrong? Could it have something to do with the elevation? I had to add 2dp elevation to my ImageView on 5.1 to get it in front of the button.
I think its the button default elevation behaviour in 5.0 and above versions causing this issue, try placing your button in separate layout this way and it should work:
<RelativeLayout
android:id="#+id/buttonMailLayout"
android:layout_width="208dp"
android:layout_height="160dp"
android:layout_centerHorizontal="true">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom|center_horizontal"
>
<Button
android:id="#+id/buttonMail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/metal"
android:text="Write Mail"
android:textSize="32dp"
android:paddingBottom="16dp"/>
</FrameLayout>
<ImageView
android:id="#+id/imageMail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="#drawable/email20"
android:elevation="2dp"
android:paddingTop="8dp"
android:paddingBottom="64dp"
android:clickable="false"/>
</RelativeLayout>
I would like to implement the following scroll view with vertical and horizontal scrolling:
9:00 9:30 10:00 10:30 11:00 ...
item1 hi11 hi12 hi13 hi14 hi15 ...
item2 hi21 hi22 hi23 hi24 hi25 ...
item3 hi31 hi32 hi33 hi34 hi35 ...
... ... ... ... ... ... ...
but in addition I would like to apply the following two constrains:
1) If the user scrolls, from down to top, the area filled with "hi"; then the first row (time) must remain visible:
2) If the user scrolls, from right to left, the area filled with "hi"; then the first column (item1, item2, ...) must remain visible.
So, after scrolling vertical and horizontally the view can have the following appearance:
16:00 16:30 17:00 17:30 18:00 ...
item23 abc cde efg gfr dfr ...
item24 cvd qwe aqw asw dfr ...
item25 dle zwq wer ser zzz ...
... ... ... ... ... ... ...
The solution that I have found so far is based on Layouts and also creating items dynamically; however this solution has the problem of not synchronising the horizontal scrolling in the central area (hi11, hi12, hi13) with the time row (9:00 9:30 10:00 ...).
So, I need a way to detect horizontal scrolling in the "central area" and apply the same horizontal scroll to the "time area" (and, if possible, vice versa).
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/epg_time_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" />
<!-- In code: Create several TextView's time
items and add them to this layout in order to
to create the first row which shows the time HH:mm -->
</LinearLayout>
</HorizontalScrollView>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="#+id/epg_channel_list_master_master"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/epg_channel_list_master_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/epg_channel_list_master"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- In code: Create a TextView for every item
to create the first column (item1, item2, ...) -->
</LinearLayout>
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<LinearLayout
android:id="#+id/epg_channel_list_detail_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- In code: Create a horizontal LinearLayout for
every row. Every row will contain several
TextViews with short names -->
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
I have found a solution based on setting "onTouchListener" for every one of both horizontal scroll views; consequently I have added in the .xml two new identifiers (one for every horizontal scroll view), and in the code I have "setOnTouchListener" for every one of the aforementioned "horizontal scroll views to listen to each other; that is:
mDetailHorizontalScrollView = (HorizontalScrollView) view
.findViewById(R.id.detail_horizontal_scroll_view);
mDetailHorizontalScrollView.setOnTouchListener(new OnTouchListener(){
#Override
public boolean onTouch(View view, MotionEvent event) {
int scrollX = view.getScrollX();
int scrollY = view.getScrollY();
mEpgTimeHorizontalScrollView.scrollTo(scrollX, scrollY);
return false;
}
});
mEpgTimeHorizontalScrollView = (HorizontalScrollView) view
.findViewById(R.id.epg_time_horizontal_scroll_view);
mEpgTimeHorizontalScrollView.setOnTouchListener(new OnTouchListener(){
#Override
public boolean onTouch(View view, MotionEvent event) {
int scrollX = view.getScrollX();
int scrollY = view.getScrollY();
mDetailHorizontalScrollView.scrollTo(scrollX, scrollY);
return false;
}
});
And the identifiers for those horizontal scroll views are set up in the code according to the xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<HorizontalScrollView
android:id="#+id/epg_time_horizontal_scroll_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/epg_time_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" />
<!-- In code: Create several TextView's time
items and add them to this layout in order to
to create the first row which shows the time HH:mm -->
</LinearLayout>
</HorizontalScrollView>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="#+id/epg_channel_list_master_master"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/epg_channel_list_master_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/epg_channel_list_master"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- In code: Create a TextView for every item
to create the first column (item1, item2, ...) -->
</LinearLayout>
<HorizontalScrollView
android:id="#+id/detail_horizontal_scroll_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<LinearLayout
android:id="#+id/epg_channel_list_detail_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- In code: Create a horizontal LinearLayout for
every row. Every row will contain several
TextViews with short names -->
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>