-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A Repaint issue? #62
Comments
Just to add a bit more info, the same happens if on the front view I add a, say, VideoView; the exact location of that view will be black when the sliding menu is opened. |
I'm still a little bit confused. Is the View removed ? Or does its surface just go black? |
Only the surface that the VideoView was covering (when the sliding menu was closed) goes black. If there is a way I can send you images, I would be glad to provide some screenshots. |
You can put them up on imgur (or any other image sharing site) and send the link |
Does it remain black when the SlidingMenu is opened again? |
Yes, it remains black if I just close and open the sliding menu on that same page. The behind view in my case is a list of menu items so if I click on the black area, it actually does invoke the list click and I update the list (in the behind view) and then I can see the real content. |
Okay I have an idea of what this might be. Have you checked out the latest changes? |
Here is a screenshot when the menu is closed and I see the camera view: Here is when I open the menu: |
My existing code is from 7/29, so it is not the latest. If you think there is anything related to this issue, I will checkout the latest; in fact, I still check out the latest anyway to make sure I am getting the best code. Thanks |
Hmmm okay let me know if that works. Yes, there were a lot of improvements and features introduced since then. I would suggest looking at the example app for some cool things. |
@naddaf Dude, it's not proper, or fair, to report issues when your code is a full month and dozens of commits behind. Just saying... |
Jeremy, Thanks, |
What happens when you invalidate the SlidingMenu? |
where would be the right place to do that? |
Try it in an OnOpenedListener |
Unfortunately didn't help; I did that in the toggle() so prior to showBehind(), I invalidated the mSlidingMenu. |
I also tried that in OnOpenedListener and didn't help. |
I am not sure what you mean by manually altering its bounds. Could you please explain? |
I don't have much experience with SurfaceViews so I would rather offer no advice and say play around than offer bad advice :\ |
Jeremy, layout resource (video.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="vertical">
<VideoView android:id="@+id/videoView1" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginTop="100dp" />
</LinearLayout> VideoFragment.java: package com.slidingmenu.example;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class VideoFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.video, container, false);
return view;
}
} Updated SlidingTitleBar.java: package com.slidingmenu.example;
import android.os.Bundle;
public class SlidingTitleBar extends BaseActivity {
public SlidingTitleBar() {
super(R.string.title_bar_slide);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// set the Above View
setContentView(R.layout.content_frame);
getSupportFragmentManager()
.beginTransaction()
// .replace(R.id.content_frame, new SampleListFragment())
.replace(R.id.content_frame, new VideoFragment())
.commit();
setSlidingActionBarEnabled(true);
}
} The VideoFragment has a simple VideoView in it and I have added 100dp margin on top to make the effect visible. If you run the sample and select Sliding Title Bar, you will see a black screen which is the video screen (since it is not playing anything, it is black) and if you slide the menu open, you will see only the top 100dp of the list, the rest is black (100dp is visible since the VideoView is placed with 100dp top margin). Note: this code works on Jelly Beans but exhibits the issue on ICS Many thanks |
I don't know how I managed to close the issues, so I reopened it, sorry. |
Try pulling the changes from this morning and running it again |
Just wanted to let you know that I had a similiar issue and the changes fixed the problem. Thanks! I am having single FrameLayout in the aboveView, which get filled with a fragment (.replace() with FragmentManager and FragmentTransaction) when you choose a menu item from the slidung menu (it's a ListView in my case). The new active fragment wasn't drawing it's UI, I just got a blank screen, but the underlying code (calls to an API etc.) worked. |
So it all works for you now? |
Oh sorry, yes it works now. |
Hi Jeremy. Thanks again, |
Set the background of your VideoView to transparent |
Hi! I had the same problem with the camera surface on the main activity. something like this: <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<SurfaceView
android:id="@+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent" />
</FrameLayout> this solved for me the problem!!!!!! |
Thank you CARLONZO - the solution works for me too. |
:) you are welcome. the solution of Jeremy (put a transparent background) did not work for me.. |
This seems to be a more general problem. The fix is the same. I changed the LinearLayout holding my MapView to FrameLayout and added the transparant view on top. Now it is working on these two devices. Btw: Thanks a lot for this great lib. I love it! |
Hi.
I am using your wonderful library along with the Sherlock library. I am running into an issue on an android 2.3 version on an HTC 4G phone. My front fragment (shown in front) has a view that shows a live camera view (it has a view that is an extension of SurfaceView) and my sliding "behind" menu is a simple list fragment.
In my JellyBean (Galaxy Nexus) device, all works fine; I can slide the front view and see the behind menu but on my HTC phone, when I do that, the real estate that was covered by the camera surface is now black on the behind menu; it seems to be a repaint issue (I guess?) since if I press on the black area, the menu item that is supposed to be there actually reacts and does its job.
I don't know how I can attach screenshots to make this visually more clear. Any help or suggestion to fix the issue is greatly appreciated.
Thanks again for the great library.
Ali.
The text was updated successfully, but these errors were encountered: