scrollview

Resize the image to half on scrolling down

走远了吗. 提交于 2019-12-23 04:55:13
问题 I want to obtain something like in the photo below: The image is fixed to the top screen. When the user start scrolling, the image will resize (smoothly) at half of it's original size (200dp to 100dp, with something like scaleType:centerCrop ) and if the user keeps scrolling (after the image it's at 100dp), the image will remain fixed to top and the scroll will work only for the rest of the view. Also, if the user will scroll up, the image will become (smoothly) to it's original size. I don't

Swift: Scroll View only when a TextField or Button is hidden by the Keyboard

筅森魡賤 提交于 2019-12-23 04:33:40
问题 Below is the code that I'm trying to use to have the view scroll only when the focused textField or UIButton is hidden by the keyboard: import UIKit class ViewController: UIViewController, UITextFieldDelegate { @IBOutlet weak var buttonToBottomConstraint: NSLayoutConstraint! @IBOutlet weak var textFieldUsername: UITextField! @IBOutlet weak var textFieldPassword: UITextField! @IBOutlet weak var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() NSNotificationCenter

AVplayer not showing in ScrollView after 2-3 times

拟墨画扇 提交于 2019-12-23 03:07:09
问题 I am adding multiple AVPlayer objects in a scrollview. For the first time this is working fine but as i go back to my previous view and come back again i am not able to see AVPlayer objects in scrollView. I need as matrix of multiple AVPlayer to show thumbnails of my videos. Please help me asap Thanks in advance. 回答1: I had a similar problem and after a lot of searching discovered that the AVPLayerItem object causes this issue. Basically when the AVPlayer items go offscreen you need to make

Releasing memory of multiple view controllers inside a scrollview

房东的猫 提交于 2019-12-23 02:39:31
问题 I have an app the loaded many view controllers in a scroll view depending on the number of objects the user has in a tableview. So when I flip between the tableview and the scroll view, the number of view controllers in the scroll view changes according to how many objects the user has in the tableview. I use the code in Apple's PageControl sample code to build the scroll view with many view controllers inside it, after some modification of course. - (void)loadScrollViewWithPage:(int)page {

adjustPan and adjustResize in nested fragment

爱⌒轻易说出口 提交于 2019-12-23 02:25:24
问题 I use a ViewPager and inside the first fragment of the ViewPager I have a another fragment that is parenting a sub fragment with ScrollView in it. to make it more visual: ┌------------┐ | 1 | 1 is the ViewPager fragment | ┌---------┐| | | 2 || 2 is the fragment inside ViewPager fragment | |┌-------┐|| | ||3 ||| 3 is the sub fragment containing the ScrollView with EditText form | ||form ||| | ||here ||| | || ||| | |└-------┘|| | └---------┘| └------------┘ Issue is: when I use adjustResize it

scrollview causes black background to appear

眉间皱痕 提交于 2019-12-23 01:58:18
问题 I just add a scrollview like this and after the screen loads a black background appears. This black area is positioned on the left and upper most corner of a surrounding RelativeLayout. While the scroll view is positioned with android:layout_marginLeft="20dp" android:layout_marginTop="40dp" So the left 20dp and the top 40dp are black, while the remaining grey background is undisturbed. Here the xml part with the scrollView: <View android:id="@+id/emptyView" android:layout_width="match_parent"

Can I use Horizontal Scrollview Inside a Viewpager in Android?

ぐ巨炮叔叔 提交于 2019-12-23 01:00:40
问题 Is it possible to make a horizontal scrollview inside viewpager in android ? The HorizontalScrollView should scroll until it reaches its edges, then on next scrolling, should load the next viewpager view. 回答1: your can just make custom xxViewpager extends Viewpager, and Override the canScroll method like below: @Override protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) { if (v instanceof HorizontalScrollView) { return true; } return super.canScroll(v, checkV, dx, x, y

how to scroll live cards in aglass activity

杀马特。学长 韩版系。学妹 提交于 2019-12-22 18:31:42
问题 I'm writing a glass app. In one activity I want to scroll between few cards (which were popups in my android app). 1) I thought to use cardsScrollView. problem: Is it possible to set customView to a card object? 2) I thought to use LiveCard problems: Is it possible to publish them inside my app and not in the timeline? Is there an equivalent LiveCardsScrollView? Any other idea how to implement this? 回答1: From Google's sample code at https://developers.google.com/glass/develop/gdk/ui/theme

How to connect scrollview to page control in TableView Cell

。_饼干妹妹 提交于 2019-12-22 13:58:41
问题 I have a custom cell designed with a scrollview and a pageview control, which I am displaying as follows - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString * CellIdentifier = @"ScrollViewCell"; cell = (ScrollViewCell*)[newsTable dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { NSArray * customcellArray = [[NSBundle mainBundle]loadNibNamed:@"ScrollViewCell" owner:self options:nil]; for(id