Weird animation of the SFDataGrid when rotation screen

Hello

I have some code where I persist data between device orientation. It works fine. However, when I rotate the screen, the grid rotate well, and then re-rotates one more time until it gets the right orientation. It's a weird and very ugly animation. A bug perhaps? 

Here's my code:

 [Activity(Label = "Casos AAA")]
    public class CaseControlActivity : Activity
    {
       private SfDataGrid grid;
       private string jsonData;

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.CaseControl);
            RelativeLayout layout = FindViewById<RelativeLayout>(Resource.Id.layoutCasos);

            grid = new SfDataGrid(this);

            grid.AllowResizingColumn = true;
            grid.AllowSorting = true;
    
            

            if (savedInstanceState != null)
            {
               jsonData = savedInstanceState.GetString("jsonData");
               grid.ItemsSource = JsonConvert.DeserializeObject<List<v_Casos>>(jsonData);
              
            }

            else
            {
                string dpPath = Path.Combine("/data/data/TPProject.TPProject/files/", "PranfHurto.db3");
                var db = new SQLiteConnection(dpPath);
                var data = db.Table<v_Casos>();
                grid.ItemsSource = data;

                jsonData = JsonConvert.SerializeObject(data);

                
            }

            layout.AddView(grid);

            grid.SelectionMode = SelectionMode.Single;
            grid.GridLongPressed += RowLongPress;
            
        }

        protected override void OnSaveInstanceState(Bundle outState)
        {
            outState.PutString("jsonData", jsonData);

            base.OnSaveInstanceState(outState);
        }

Is there any workaround for my users who obviously doesn't want to see this weird rotating animation??? Thank you!

3 Replies

AN Ashok N Syncfusion Team December 24, 2017 03:04 PM UTC

Hi Samuel, 

Thanks for contacting Syncfusion support.  

We have prepared the sample using your code example and tested by changing the orientation many times in both Horizontal and vertical, our SfDatagrid has been rotated properly in all the times. For your reference we have attached our sample in the below location, please refer it. Could you please revert us by modifying our attached sample based on your requirement or please share your tested video with device details that will be help us to proceed further.  


Regards 
Ashok  



SO Samuel Otero December 26, 2017 07:00 PM UTC

Guys, the problem is right there in the very same project that you guys sent for me to download. It doesn't happens in newer versions of Android, but you can re-create the problem using an emulator for Android 5.1 and below.


AN Ashok N Syncfusion Team December 31, 2017 06:01 AM UTC

Hi Samuel, 
 
Thanks for your update. We have checked the reported issue with Moto G4 (Android 4.4) physical device in SfDataGrid v15.4.0.17 and our SfDataGrid has been changed orientation properly. Please share your tested video, that will be help us to confirm the reported issue. Also share SfDataGrid version details. 
 
Regards, 
Ashok  


Loader.
Up arrow icon