Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8231621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:33:30+00:00 2026-06-07T17:33:30+00:00

Here is my code : private void setWeatherDialogInfoAndIcons(){ WeatherGoogle weather = WeatherGoogle.getInstance(istanbul); String iconsPath

  • 0

Here is my code :

private void setWeatherDialogInfoAndIcons(){
    WeatherGoogle weather = WeatherGoogle.getInstance("istanbul");
    String iconsPath = Environment.getExternalStorageDirectory().getAbsolutePath()+"/arla/images/hava/";
    String[] allData = weather.getCityData().split("<>");

    currentImage = (ImageView) customDialog.findViewById(R.id.imageViewcurrentWeatherImage );
    currentInfo  = (TextView) customDialog.findViewById( R.id.textViewCurrentInfo )  ;
    currentInfo.setText( allData[0] +"\n"+allData[1]+"\n"+allData[2]+"\n"+allData[3] );

    currentImage.setBackgroundResource(R.drawable.air);
    currentImage.setBackgroundDrawable( UiHelper.getDrawableFromSdcard(iconsPath + weather.getIconName(0)) );

    int j = 4;
    for (int i = 0; i < dayInfos.size() ; i++) {
        dayInfos.get(i).setText( allData[j] +"\nMin  : "+ allData[j+1] +"\nMaks: "+ allData[j+2] 
                + "\n" + allData[j+3]   );
        j+=4;
    }

}

I can change the texts of textviews but when i want to set the background of imageviev(currentImage) it doesnt work , it shows the dialog but there is no background in Imageview.

 currentImage.setBackgroundDrawable( UiHelper.getDrawableFromSdcard(iconsPath + weather.getIconName(0)) );

I am sure that my method getDrawableFromSdcard works because i used it somewhere else in my code lastly i checked png icon and its path. So what can be the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:33:32+00:00Added an answer on June 7, 2026 at 5:33 pm
    currentImage.setBackgroundDrawable(getResources.getDrawable(R.drawable.air));
    

    From SDcard :

    Bitmap picture = BitmapFactory.decodeFile("file_path");
    imageView.setImageBitmap(picture);
    

    Try it. Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my code: private void UploadFilesToRemoteUrl(string url, string[] files, string logpath, NameValueCollection nvc)
here's my code private void make_Book(int x, int y, string name) { #region Creating
Got this line of code here but its not working. private void Button_Click(object sender,
Here's the code: private void sendFile(InputStream file, OutputStream out) throws IOException { Log.d(TAG, trying
I have some code here: private void button1_Click(object sender, EventArgs e) { Application.Run(new Form3());
Here's my code: private void Form1_Load(object sender, EventArgs e) { maskedTextBox1.Mask = *[L]; maskedTextBox1.MaskInputRejected
I have some code here private void Run() { MyClass c = new MyClass();
Here's my code: private void OnReceive(IAsyncResult result) { NetStateObject state = (NetStateObject)result.AsyncState; Socket client
Here's my code: private void LoadStudents() { Int64 gradeInstanceId = Convert.ToInt64(cmbGradeInstance.SelectedValue); StudentInstanceRepository studentInstanceRepo =
Here's my code: private void makeDialog2() { AlertDialog.Builder about = new AlertDialog.Builder(getContext()); about.setTitle(You Won!);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.