Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKristen Law
16,244 PointsWhite gap between the content and Action Bar?
I seem to be getting a white gap between the Action Bar and the webpage content/blog post. I followed all the steps in this video (and I also took out the padding in the xml file). Any idea why this is happening or how to fix it? Thanks!
This is the code from my activity_blog_web_view.xml
layout file:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.kristen.blogreader.BlogWebViewActivity" >
<WebView
android:id="@+id/webView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" />
</RelativeLayout>
Joseph Greevy
4,990 PointsI have a different problem when you created your new class did it give you a fragment? My app crashes and it seems to be because of this fragment in my code e.g my code reads
tools:context="com.multiplis.therugbytimes.BlogWebViewActivity$PlaceholderFragment" >
Kristen Law
16,244 PointsJoseph Greevy: I'm not sure I understand your question. Can you make a more detailed post on the forum? I'll see if I can figure out the issue and maybe some others will be able to help too.
Joseph Greevy
4,990 PointsNo worries I saw some of the problem it made a fragment xml file and a normal one so I think I can fix it
Kristen Law
16,244 PointsOk, good luck!
1 Answer
Harry James
14,780 PointsI get this white bar as well. I didn't think much of it though.
I assume that this is just an issue in the way the site is coded. Maybe the "Start learning for free today! (14-day trial) PICK YOUR PLAN" message isn't displaying and is what's causing this white space. I am not sure.
It's not a problem in the code you have written, however. So, you can carry on as normal.
Kristen Law
16,244 PointsI thought that might be the issue too, so I modified the Blog Reader app to view a different blog. I just finished it and there's no white gap :)
Thanks for your response!
Harry James
14,780 PointsAh, nice plan! That's the beauty of the MVC pattern! All you need to change is the URL and bam, everything's updated!
Kristen Law
16,244 PointsUnfortunately, it wasn't that simple since the JSON for the new blog was more complicated, but I was able to make the necessary changes.
Kristen Law
16,244 PointsKristen Law
16,244 PointsMaybe Ben Jakuben can help?