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 display image with text on Background image in android

imagView=(ImageView)findViewById(R.id.imageView1);
       // Bitmap src = BitmapFactory.decodeFile("drawable/androidfather_andy_rubin.jpg");
       // Bitmap scaled = Bitmap.createScaledBitmap(src, 40, 40, true);
        Bitmap mBitmapImage = BitmapFactory.decodeResource(getResources(), R.drawable.androidfather_andy_rubin);
        Bitmap mBitmapBackgrndImage = BitmapFactory.decodeResource(getResources(), R.drawable.aqua_nine_patch_image);
               
                int backImg_width  = mBitmapBackgrndImage.getWidth();
                int backImg_height = mBitmapBackgrndImage.getHeight();
                int Img_width  = backImg_width-70;///mBitmapImage.getWidth();
                int Img_height = backImg_height-70;//mBitmapImage.getHeight();
                Bitmap bmOverlay = Bitmap.createScaledBitmap(mBitmapImage, Img_width, Img_height, true);
                Bitmap bmBackgroundOverlay = Bitmap.createScaledBitmap(mBitmapBackgrndImage, backImg_width, backImg_height, true);
                //Bitmap bmOverlay = Bitmap.createBitmap(Img_width,Img_height, mBitmapImage.getConfig());
                // Bitmap bm = ShrinkBitmap("drawable/androidfather_andy_rubin.jpg", Img_width, Img_height);
                imagView.setBackgroundResource(R.drawable.aqua_nine_patch_image);
                imagView.setImageBitmap(bmOverlay);

Comments

Post a Comment