• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to get ViewPager to recognize and wrap_content on tab fragments?

My problem:
I 'm having an issue and cannot determine why the ViewPager will not display the tab fragment fields unless I hard code the 'layout_height" parameter? Below I have an image of what happens and what my goal is.

The ViewPager resides in the ConstraintLayout beneath the TabLayout. The 'blueprint" layout provides a visual image of the ViewPager constrained to the ConstraintLayout to expand as needed.

What I have tried:
I have watched 3-4 TabLayout tutorials and read various documentation. The only difference between my project and those is that my activity is not specifically restricted to just the tab layout, but begins after the other fields. However, I'm not sure this has an impact because, as I said, if I hard code the height of the ViewPager each tab fragment content can be seen within each tab.

Let me know what else may be needed to help assist my issue since I provided limited code (see below).


What happens:

Tab with no fields displayed.JPG


The Goal:

The Goal.JPG


The white line is both the ViewPager constrained to the Constraint Layout

ContraintLayout-ViewPager.JPG


Related code (ViewPager setup and ViewPager XML):
Java:
SectionsPageAdapter adapter = new SectionsPageAdapter(getSupportFragmentManager());
        adapter.addFragment(new SourceFragment(noteDetails.get(2), noteDetails.get(3)), "Source");
        adapter.addFragment(new QuoteTermFragment(noteDetails.get(5), noteDetails.get(6)), "Quote and Term");
        adapter.addFragment(new FilesFragment(), "File");
        viewPager.setAdapter(adapter);
        tabLayout.setupWithViewPager(viewPager);

XML:
   //.... tablayout code and items....
   </com.google.android.material.tabs.TabLayout>

    <androidx.viewpager.widget.ViewPager
            android:id="@+id/view_ViewPager"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintTop_toBottomOf="@id/view_Tab_Layout"
            android:layout_margin="5dp"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent">

    </androidx.viewpager.widget.ViewPager>
</androidx.constraintlayout.widget.ConstraintLayout>

Slo-Mo camera sounds like a horror movie

Ah, my bad and you are no doubt correct in the need for additional frames to convert. Recording in slo-mo would fill my needs 99% of the time. It's that rare occasion that a random video captures something that would be hilarious if slowed down and viewed with such quality.

Recording in 60fps would allow you to do that, though higher frame rate would be better. I have some footage in 240fps that looks slick, but haven't posted anywhere yet (done with a gopro)

Apps Android Room: Passing method variables to @Query annotation statement

I did find resolution to this issue, but not as expected. The following code was provided by Android Room development as the proper syntax and solution. They stated that the examples provided shouldn't be taken literally, which doesn't make any sense from a documentation standpoint. The purpose of documentation is to "document" how to do or use something, why would you make it up? Especially when the purpose of the Room Persistence Library is to reduce complexity, even in querying data.

@Query("SELECT CommentID FROM Comments WHERE Comment LIKE '%' || :value || '%'")
List<Integer> customSearchCommentsTable(String value);

Anyhow, sorry for the rant. Just know the example provided in the documentation does not work as implied.

For further reference if needed, see the following I posted:
Issue Tracker:
https://issuetracker.google.com/issues/149519050

StackOverflow:
https://stackoverflow.com/questions...turning-data-known-to-exist/60622070#60622070

Contacts back up

Go into your contacts app, view the contacts list, then go into the app's settings. Somewhere in there you'll find an option to import/export contacts (possibly under 'contacts management', but as LG will use their own contacts app it will depend where they put it). Choosing 'export' lets you export them to a vcard file (.vcf) which you can then copy to your computer. That's a standard format which you can import into any contacts management program.

The actual contacts database is in a location you won't be able to see without root (basic information security: if it was in a 'public' place any app with filesystem access would be able to copy your contacts and upload them to their favourite spam sites), so exporting them is the way to do it.

If you sync them with a cloud service (e.g. your GMail account) you can probably export them from there as well.

Ok great I'm gonna give that a try! Thank you &#128513;&#128513;&#128513;

Virus on Phone

Did you notice the part where you can limit how much space it uses, thereby making it unnecessary to manually clear its cache? :)

Its option to clear cache is generally not needed, as it obeys the limit it's given. That's more for a one-off thing if you want to clear its [user-limited] cache for some reason.

Yes.
But all of those cache limits seem large to me.

I don't even have apps that size.

For what its worth, I see no purpose in any cache at all.

When I delete it all, my device runs great.

When my device starts moving slow and stumbling, 99% of the time it is due to a gigantic pile of steaming cache.

Small memory devices should have the ability to just not allow apps to build caches at all.

Yes, I know that the info is supposedly making the app faster and that it will just reload when I open the app again.

Frankly, I am fine with that.
But there is no need for it to just sit there and grow and grow and grow, as it winds up just slowing the device down to a crawl and then a stop eventually.

My ol'lady has an identical device.
She likes to take pictures.
She downloaded some crAPP that was supposed to do something with her photos that she thought sounded cool.

So after a week or so, she is bitching about her phone, and me for 'doing sonething to it'.

Mind you, this is a device that has 16GB internal memory, about 6¼GB is used by the system.

Her phone was non-functional.
As in non-responsive.

I actually had to go into the developers options and turn all the animation off completely.

Then I could navigate, albeit very slowly.

So, it turns out that her memory is completely full.

She has a 32GB SD card, with about ⅓ space remaining, but the phone clogged.

The phone is set to put pictures and videos onto the SD card.

I checked the file manager, and nothing seemed to be amiss- no giant files, no folders with large amounts of files, but 0 memory available.

The device crashed a couple of times, just trying to find what the heck was causing this.

Luckily, I had already installed Android System Cleaner on her device, so I closed all open apps and ran it.

There is a duplicate finder feature, and I used it.

It turns out that this turd of an app she got has been storing a copy of every single video and photo on the device- but in its own cache files in the device's internal memory.

So there was a copy of every single thing on the SD card on the device as well.

So luckily, the duplicate finder feature tells you the location of the files that it finds, and I used this info to delete the offending garbage.

As far as I am concerned, that picture app should be classified as malware.

If it wasn't for that cleaner finding those files within minutes, I would need to have located and sorted through 6GB of digipoop by hand.

Part of the problem is that she plays endless amounts of those stupid 'candy' games, where you match items and solve puzzles.

Many of these games have hundreds of texture and layout files that are stored on the internal memory.
Whatever that app was, made copies of all those as well.

As just one of these games has around 800 of these files, you can only imagine what it was like having 800 more put onto the device, and then another copy onto the SD card.

She has like 6-8 of these games, and does not delete the files when she moves on to other games.

Just because I mentioned it here, the next time I get a hold of her phone, I will screenshot her apps list from the Play Store.

I still get it and clean it out every once in a while, and update the apps she needs updated, so I will screenshot it (or part of it) then shoot the pics over to my device and send them in a message.

Transdroid question

I've just started using Transdroid and had no trouble with the setup, but something odd is happening and I can't figure it out.

When files in a torrent are set to "priority: don't download" and I change the priority to "normal" in Transdroid, the priority updates in both Transdroid and rutorrent, but the files don't start to download. If I then go into rutorrent and change any other "don't download" file in the torrent (not one of the ones I changed in Transdroid) to "normal," all of the ones that I changed in Transdroid with start to download. Any idea why that would be happening? Anything I can to to fix it, so that when I change file priorities from "don't download" to "normal" in Transdroid, they start to download?

Font and icons shrunk and I can't get them large again

Have you tried just restarting your phone?
And just to clarify, when you state you can't 'get them large again' this means you have looked into the 'Display' menu in your Settings?
There should be options there referring to Font size and Display size.
If you have and those options aren't working when you readjust them, try restarting your Stylo 4 into its Safe Mode and see if you can change those options while in Safe Mode:
https://www.hardreset.info/devices/lg/lg-stylo-4/safe-mode/
If changing the font size and display resolution works out while in Safe Mode, that's an indicator some kind of third-party app is involved. Have you installed something like a launcher app or something similar?

Screen hung, how to force a shutdown?

Thanks!!
I've since called Samsung directly (I forgot that they have great customer service hours & actually answer the phone.) They agreed that the phone has been rooted (the kernel # doesn't match the model A50) & the two keys function had been altered. So now I am in the process of seeing if I can get a replacement from the eBay seller. I've now been scared off from buying "open Box" cell phones because of this.:mad: I fear that I'm going to have to shop for a new phone that is available as "new" and unlocked and in the mid-range price slot like the A50. Ugh... how time consuming... :mad:

Samsung j7

I don't know if you ever solved this, but the best way to do this is to go to the Apps screen, click on the ... (menu) and select Home Screen Settings. Scroll down to "Hide Apps" and it will bring up a screen of all your apps that may have check marks that would make them hidden. Uncheck any apps you don't want hidden. Then choose apply.

5G Discussion & Explanation

What little I remember of the Providence RI roll out article I saw you could get it in some shops that had a repeater but plate glass windows blocked the signal. When outside a few steps to the left or right would make you drop that signal. Providence is also very hilly and elevation seemed to play a role.
This is no where near Tesla's dream of wireless power transmission for everyone. Maybe if they can increase transmission range somehow?

Filter

Back
Top Bottom