Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0e7f95f authored by Amit Kumar's avatar Amit Kumar
Browse files

Open Weather app from weather widget

parent 86799eaa
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@ import static cyanogenmod.providers.WeatherContract.WeatherColumns.WindSpeedUnit


import android.annotation.SuppressLint;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View;
@@ -211,5 +212,13 @@ public class ForecastBuilder {
                        itemSidePadding, LinearLayout.LayoutParams.MATCH_PARENT));
                        itemSidePadding, LinearLayout.LayoutParams.MATCH_PARENT));
            }
            }
        }
        }

        smallPanel.setOnClickListener(v -> {
            Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage("foundation.e.weather");
            if(launchIntent != null){
                launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                context.startActivity(launchIntent);
            }
        });
    }
    }
}
}
+9 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@ import static lineageos.providers.WeatherContract.WeatherColumns.WindSpeedUnit.M


import android.annotation.SuppressLint;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View;
@@ -211,5 +212,13 @@ public class ForecastBuilder {
                        itemSidePadding, LinearLayout.LayoutParams.MATCH_PARENT));
                        itemSidePadding, LinearLayout.LayoutParams.MATCH_PARENT));
            }
            }
        }
        }

        smallPanel.setOnClickListener(v -> {
            Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage("foundation.e.weather");
            if(launchIntent != null){
                launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                context.startActivity(launchIntent);
            }
        });
    }
    }
}
}
+7 −0
Original line number Original line Diff line number Diff line
@@ -1258,6 +1258,13 @@ public class LauncherActivity extends AppCompatActivity implements


        mWeatherSetupTextView = findViewById(R.id.weather_setup_textview);
        mWeatherSetupTextView = findViewById(R.id.weather_setup_textview);
        mWeatherPanel = findViewById(R.id.weather_panel);
        mWeatherPanel = findViewById(R.id.weather_panel);
        mWeatherPanel.setOnClickListener(v -> {
            Intent launchIntent = getPackageManager().getLaunchIntentForPackage("foundation.e.weather");
            if(launchIntent != null){
                launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(launchIntent);
            }
        });
        updateWeatherPanel();
        updateWeatherPanel();


        if (org.indin.blisslaunchero.features.weather.WeatherUtils.isWeatherServiceAvailable(
        if (org.indin.blisslaunchero.features.weather.WeatherUtils.isWeatherServiceAvailable(
+2 −3
Original line number Original line Diff line number Diff line
@@ -59,9 +59,9 @@
                android:layout_width="match_parent"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:layout_marginBottom="8dp"
                android:layout_marginEnd="8dp"
                android:layout_marginEnd="16dp"
                android:layout_marginStart="16dp"
                android:layout_marginStart="16dp"
                android:layout_marginTop="16dp">
                android:layout_marginTop="8dp">


                <ImageView
                <ImageView
                    android:id="@+id/weather_image"
                    android:id="@+id/weather_image"
@@ -87,7 +87,6 @@
                        android:layout_width="wrap_content"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_gravity="center_vertical"
                        android:layout_marginEnd="8dp"
                        android:ellipsize="end"
                        android:ellipsize="end"
                        android:fontFamily="sans-serif-medium"
                        android:fontFamily="sans-serif-medium"
                        android:maxLines="2"
                        android:maxLines="2"
+1 −1

File changed.

Contains only whitespace changes.