Skip to main content

Featured

Android studio “SDK tools directory is missing”

Following 2 possible solutions will resolve this problem :  Solution1 : To fix the problem, it was required that I list the path to my corporate PAC file by using  Configure -> "Appearance and Behavior" -> System Settings -> HTTP Proxy . I selected "Automatic proxy configuration url:" Delete your  ~/.Android*  folders (losing all of your settings :/). Run Android Studio. It will show you a welcome wizard where it tries to download the SDK again (and fails due to my rubbish internet). Click the X on the wizard window. That will enable you to get to the normal welcome dialog. Go to Settings->Project Defaults->Project Structure and change the Android SDK location to the correct one. Solution 2 : To fix the problem, it was required that I list the path to my corporate PAC file by using  Configure -> "Appearance and Behavior" -> System Settings -> HTTP Proxy . I selected "Automatic proxy configuration url:&quo

Code to scroll the ScrollView to bottom of the Screen at runtime,Android

======>  Here in my LegalPlex Version-2 project, i have a requirement of "Client Details screen in small devices(because in large devices this layout is not used) ,like it will showed initially only bottom elements of screen.For that we need to scroll the ScrollView(Which contains all the elements of that Layout) initially to the bottom of the screen.

For doing that i used below code,and put that code in onStart() method.
If you want to place in some other place,it is also possible.i just used this based on my requirement only.


@Override
    public void onStart() {
        super.onStart();
        
        clientDetailsScreenScrollView=((ScrollView) findViewById(R.id.clientDetailsScreenScrollView));
        clientDetailsScreenScrollView.post(new Runnable() {

            @Override
            public void run() {
                clientDetailsScreenScrollView.fullScroll(ScrollView.FOCUS_DOWN);
            }
        });
    }

Comments