First of all, this is my first question aske here, I'm kinda "newbie" on Android Development and also, my english skills aren't really good, so I will try to do my best.
Please is something is unclear, I will appreciate if you could ask me what could I explain more.
So, the point is that i have an application with an Activity who loads differents fragments.
One of these fragments, loads 2 fragments on a LinearLayout, where the first one (Caldroid Fragment) should be: wrap_content (in order to display completely the calendar).
The second one, it's a fragment which contains a simple textview + a RecyclerView. My problem is that, this fragment has a really little space to show the items on the recyclerview (image).
How can I implement the hide of the CaldroidFragment just when I scroll through the Fragment with the RecyclerView?
I tried to put the Layout container of both fragments inside a ScrollView but it didnt work, and a lot of differents solutions related to this type of problems. I think this could be implemented with parallax or something, but im really sure that im falling in a XY problem.
That's why I ask some kind of help or pointer to understand my problem, what could I change in the implementation.
Thanks a lot for reading!
PS: I can't upload images because i have not the mininum 10 reputation points.
The XML code is:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
>
<FrameLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/calendario"
/>
<FrameLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="#+id/gastos"
/>
</LinearLayout>
EDIT:
It was a problem from the library I was using. So nothing to do with it.
Related
I am trying to make this specific menu from the image.
As you can see from the photo, the menu is based on filtering and submitting the custom filter. The way this menu is aimed to be used is by swiping left or right depending on the user's choice as shown in this image.
When swiped, depending on which element is currently located in the trigger point, in this case, the center of the page, it would give it a custom class as shown here.
I understand that question is too broad to be fully answered and I totally agree with that. My aim is to get some sort of help or advice in which direction should I go in order to accomplish this (using a library you know or tutorial explaining similar issues).
** Also if someone has an idea of how to make these elements swipeable, it would be of great help.
Thank you in advance.
I want to place the hamburger menu icon on the right like on the picture below. And the menu should slide from right to left.
I looked for a way to do this but it looks like a simple setting does not exist for this? I started a few days ago learning Xamarin.Forms and this is the first problem I got. I spent hours but without success...
If anyone knows a solution, please share.
I tried this on Github but it has no effect at all and it also says:
'MasterDetailPageRenderer.MasterDetailPageRenderer()' is obsolete:
'This constructor is obsolete as of version 2.5. Please use
MasterDetailPageRenderer(Context) instead.'
And please don't tell me to use SlideOverKit. Something simple as this should be out of the box.
Apparently there is a way of doing this (as explained here):
manifest:
<application android:label="Sanaap" android:icon="#mipmap/launcher_foreground" android:theme="#style/MainTheme" android:supportsRtl="true">
MainView.xaml:
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Sanaap.App.Views.MenuView"
FlowDirection="RightToLeft"
Title="Main">
One downside, FlowDirection must be set back to LeftToRight on all other ContentPages
I'm using https://gist.github.com/8cbe094bb7a783e37ad1 in order to display multiple page of a ViewPager at once. It works great with a simple PageAdapter, but I need to display a large amount of Bitmaps. So I read http://developer.android.com/training/displaying-bitmaps/index.html and it says :
You can implement this pattern using a ViewPager component backed by a PagerAdapter. However, a more suitable backing adapter is the subclass FragmentStatePagerAdapter which automatically destroys and saves state of the Fragments in the ViewPager as they disappear off-screen, keeping memory usage down.
I tried to create a new FragmentStatePagerAdapter but it doesn't work :
E/AndroidRuntime(25400): android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff
I really don't understand what's the error, because I'm not using any particular resources except layouts.
Does anyone have an idea how to resolve this ?
I just discover that it works when I add an android:id to the ViewPager inside the PageContainer. So, just with an id it seems to work, but I don't understand why.
If someone have an idea, I'll be glad to understand.
The documentation explicitly says so:
When using FragmentPagerAdapter the host ViewPager must have a valid ID set.
I'm glad I found your answer because it was giving me a headache for quite some time as well. Soon as I saw your answer I remember skimming it and feeling like an idiot.
I am NOT after anyone to code this, I am after some advice and possibly links to similar system, that we may learn from
I have searched long and hard, but had no luck. What I am wanting to do is:
Have a webpage with two panes. Demo image below.
Upper Pane: holds a CSS file, like a textarea. User can edit and save as they go. With a Preview button below..
..which onclick shows a preview pane or modal window. With the css changes to a particular file.
I suppose its a bit like JS fiddle, but it preloads a specific css file.
The Preview pane has a specific html file loaded. So that when user saves the session updates the css file, and they can se their progress.
I know this isnt a question in the strictest sense, and perhaps before voting down you may just assist with some pointers to similar scripts .. or logic. As it is I have had no luck finding anything that can do this, let alone knowing where to start to create something like this.
Another one pure css jsfiddle Dabblet.com:
Instant preview, increment/decrement by alt+up/down keys
I'm building a Flex application with about a dozen different screens. There's relationships between the screens such as when on screen 1, I click on something that is an input to screen 2. Then I might bring up screen 3, then go back to 2 and then bring up screen 4. To make it clear to the user where they are in the application, we'd like to implement a breadcrumbs concept where the user gets to see which screen they are and be able to navigate back up the trail they came from.
So in thinking about how to implement this, it seems to me that I should have a stack of views. Views get pushed onto the stack, then popped off. The breadcrumbs would be a visual depiction of that stack, eg: Home >> Alert 123 >> Customer B Summary >> Customer B Detail
Having said this, I'm trying to come up with a pattern for how to implement this. The obvious starting point would be a mx:ViewStack as a container. Then I'd add views as children and make them visible - effectively "pushing" then onto the view stack. Then to close that screen I'd remove them as children to "pop" them off. This would have to update some stack data structure somewhere that the breadcrumbs would be able to see. In fact the breadcrumbs themselves can modify the stack when the user clicks on an item in the breadcrumbs to jump to.
In any case, I'm going to be working on this but just curious if anybody has anything to share around any patterns/frameworks you've used to manage multiple screens and how they come up and go away and navigate between them that I can use for some ideas.
Seems like a simple thing but in practice it's not always straight-forward.
MVC i think would be helpfull to orgenize your code and have a rebustable application .
There is no 100% design pattern ,most times it is the way you implement it .
I find mvc great when having many views because it keeps your mxml pretty clean and small and when you add features you do it in a pure as class which keeps your code from complicationg.
Just throwing some ideas, hoping it can help ...
Maybe you could use the memento pattern? Or use a command pattern with a CommandStack?