View is not visible after alpha(0) animation

I need to fadeout a view and I need to show it again after some user action.

So I did this :


on animation end I did :


and then when I want to show it once again I do


after which the view is not visible for some reason.

currently the only way I found to solve this issue is by doing this on animation end :

view.animate().alpha(1).start(); view.setVisibility(View.GONE);

and this solves it.
Wanted to know if there's other way which is more elegant and a better practice. Thanks

-------------Problems Reply------------

You need to reset the alpha back to 1: view.setAlpha(1f) when showing your view again.

Category:android Views:3 Time:2019-01-12
Tags: android

Related post

  • A new view is not visible 2011-06-29

    I just made a view using CGRectMake but the view is not visible. Here's my code until now: mainView = [[UIView alloc] initWithFrame:CGRectMake(0,20,320,460)]; mainView.userInteractionEnabled = YES; mainView.backgroundColor = [UIColor whiteColor]; mai

  • NSTextView Drag & Drop - Characters not visible after drop 2011-12-20

    I've subclasses an NSTextView so that I can drop a file and copy the string contents of the file into the view (as opposed to the standard implementation which drops the filepath into the view). The text seems to be dropping correctly, but then is no

  • UISplitView: detail view is not visible 2011-03-04

    In application:didFinishLaunchingWithOptions: I'm adding a split view: [self.window addSubview:splitViewController.view]; [self.window makeKeyAndVisible]; splitViewController comes from NIB loaded in app delegate, and is pretty simple one, with table

  • Detect if some part of the view is NOT visible? 2011-06-27

    Is it possible to detect if some part of the view is not visible on the screen? This is used in a situation that view's width/height is bigger that its parent's width/height. EDIT I get that the height of a view is 0. Does anyone knows why? I fetch t

  • problem synchronizing OneNote. The selected view is not visible in One Note 2013-05-11

    Dear All, I have a problem synchronizing OneNote. The selected view is not visible in One Note. The message that appears is: This section contains changes that could not be synced because the section file was not found. The section may have been move

  • Block-based UIView animation goes into turbo when view is not visible 2010-08-06

    I'm using the new block-oriented UIView animation methods to create a sliding-and-fading slideshow inspired by the one that shows up on the home screen of the Flickr application. It's all working very nicely, and I'm no longer intimidated by blocks.

  • IPhone View is not loading after upgrade to IOS 4.2 2011-02-08

    I have looked around for an answer, and I see related problems on this and other sites, but the solutions do not relate to me. I have an app that was working just fine before I upgraded to IOS 4.2. Now the app does not load the view which includes an

  • Dialog not visible after coming back on different activity 2014-03-19

    In my app I have 2 activities, MainActivity and SecondActivity. In MainActivity I have three tabs:- MapView ListView ListView [Which Opens a Dialog onItemClick and then redirects to different page] The issues is in this scenario:- Goto third tab and

  • Cannot find if a view is not visible on screen in a ScrollView. Always returns true 2014-05-17

    I have been trying to determine if a TextView can be seen on the screen, if not I want to display a small text saying "Scroll To Read". I have tried various methods from questions like this and many others too. In the detail fragment of my Master-Det

  • Link button image not visible after postback 2010-01-25

    I have a link button with image and label inside it. After postback, the image and label is not visible. < asp:LinkButton ID="AddNewRunLinkButton" runat="server" CssClass="Navigationlocalnav" OnClick="AddNewRunLinkButton_Click" > < img id="I

  • ScrollBars are not visible after changing positions of controls inside a Canvas 2010-06-17

    I created a custom canvas control inheriting from WPF Canvas. I am using it like this in main window - <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <RTD:RTDesignerCanvas Margin="5" Background="White"

  • Blackberry JDE component Package 4.6.1 not visible after disabling Vista UAC 2010-09-21

    I'm running Eclipse version 3.4.1 on a Windows Vista machine. Currently I've installed: BB JDE plug-in for eclipse ver. BB Component Pack 4.6.1 BB component pack Usually I work with the UAC enabled and everything was fine till when I

  • View is not redrawn after updating QSqlTableModel 2011-04-16

    There is a sub-class of QSqlTableModel. class TaskManager : public QSqlTableModel { Q_OBJECT public: explicit TaskManager(QObject *parent = 0){} void initMode(); bool addTask(Task &task); ... } This is initModel() void TaskManager::initModel() {

  • When Extending LinearLayout Child Views are not visible 2011-06-09

    Alright. So I start my activity in Main, grab the FragmentManager and instantiate a Fragment which needs to return a View. OK. So I extended a LinearLayout in order to have something to return. My Activity and Fragment are happy but I am not. Three L

  • chart not visible after installing 2011-06-10

    I have developed application (.net 4.0) with chart and created setup and deployed in another system (windows 2007 server). After installing the chart is not visible. But the same program running in my system. It is working fine in local system

  • ActionbarSherlock progress not visible after orientation change 2012-01-28

    Tested on 2.x physical and virtual devices. Not tested on v3> When the app starts, in either portrait or Landscape mode the progress bar shows in the actionbar fine. After the FragmentActivity restarts following orientation change the progress no

  • Excel Charts are not visible after upgrading to Excel 2010 2013-05-08

    I have old Excel 2007 files with separate sheet with charts. I upgrades to Office 2010 and now these charts are not visible. I can click the "Move Chart Location " tab and then choose "Object in" and the chart is visible in the data sheet. I have cre

  • files and folders not visible after virus attack in external HDD 2014-03-28

    I've an external Seagate 500GB HDD. Yesterday I connected it to my friend's laptop but his laptop was virus attacked. I didn't know it. so I just copied the files to my HDD. After connecting HDD to my laptop, I scanned it several times but a single f

  • Ember view is not updating after re-ordering array used to create child views 2012-03-06

    I have an activities view that contains an array of activities. This array gets sorted sometimes based on a calculated property(distanced_from_home) that the user can update. When the array is sorted I want the child views to be re-rendered by accord

  • PFD and ND Panell are not visible after start a flight with flight simulator x on Vista 2012-06-05

    First time I set up flight simulator x on Vista Laptop, when I wnt to start a flight the PFD and ND Panell are not visible and until now I can not fix this problem --------------Solutions------------- Hi, 1. Have you made any recent changes on the co

  • Hard drive not visible after installing Windows 7 2012-11-21

    My second hard drive is no longer visible under "My Computer" since installing Windows 7 (clean install). Both hard drives show up in Device Manager and supposedly both are working properly. The hard drive that I have Windows 7 on is the SATA Prime a

  • Scans of images are not visible after upgrade from OneNote 2010 to OneNote 2013 2014-11-24

    I have a lot of scanned images in my notebooks created in OneNote 2010. Some time ago I upgraded into OneNote 2013. Everythig works well, but..., I noticed that the scaned images are not visible in OneNote 2013. I can only see frames of the

  • View still there but not visible after being moved out by animation 2010-12-21

    I have a small but annoying probleme with animations on views in Android. What is involved: I have a FrameLayout in another FrameLayout contained in a xml. <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.and

  • android opengl view (with camera preview) is not visible after activity resumed 2010-08-07

    i overlapped opengl view and camera preview, and it shows everything at fresh start. but after backed from child activity (after onResume()) opengl objects not appeared anymore. i found some discussion about this weird problem, but i can't use follow

  • Use UINavigationController as modal view, and view are not released after dismiss 2012-01-13

    I am using a class inherited from UINavigationController present as a modal view, in the navigation bar I have a button 'Done' which will dismiss the modal view when user tap on it. Everything behave normal except the dealloc() in ImagePickerControll

Copyright (C), All Rights Reserved.

processed in 0.269 (s). 11 q(s)