Merge from r2.2
This commit is contained in:
parent
54b1cb94cc
commit
cddb17bc0c
3 changed files with 4 additions and 6 deletions
|
@ -21,8 +21,7 @@ import net.osmand.plus.download.DownloadActivity;
|
|||
|
||||
public class FirstUsageFragment extends Fragment {
|
||||
public static final String TAG = "FirstUsageFragment";
|
||||
public static boolean TO_SHOW = true;
|
||||
|
||||
public static boolean SHOW = true;
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
|
@ -41,7 +40,6 @@ public class FirstUsageFragment extends Fragment {
|
|||
skipButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
TO_SHOW = false;
|
||||
getActivity().getSupportFragmentManager().beginTransaction()
|
||||
.remove(FirstUsageFragment.this).commit();
|
||||
}
|
||||
|
@ -50,7 +48,6 @@ public class FirstUsageFragment extends Fragment {
|
|||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (hasFocus) {
|
||||
TO_SHOW = false;
|
||||
getActivity().getSupportFragmentManager().beginTransaction()
|
||||
.remove(FirstUsageFragment.this).commit();
|
||||
final Intent intent = new Intent(getActivity(), DownloadActivity.class);
|
||||
|
|
|
@ -189,6 +189,7 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents,
|
|||
|
||||
mapView = new OsmandMapTileView(this, w, h);
|
||||
if (app.getAppInitializer().checkAppVersionChanged(this) && WhatsNewDialogFragment.SHOW) {
|
||||
WhatsNewDialogFragment.SHOW = false;
|
||||
new WhatsNewDialogFragment().show(getSupportFragmentManager(), null);
|
||||
}
|
||||
mapActions = new MapActivityActions(this);
|
||||
|
@ -250,7 +251,8 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents,
|
|||
}
|
||||
mapView.refreshMap(true);
|
||||
|
||||
if (getMyApplication().getAppInitializer().isFirstTime(this) && FirstUsageFragment.TO_SHOW) {
|
||||
if (getMyApplication().getAppInitializer().isFirstTime(this) && FirstUsageFragment.SHOW) {
|
||||
FirstUsageFragment.SHOW = false;
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.fragmentContainer, new FirstUsageFragment(),
|
||||
FirstUsageFragment.TAG).commit();
|
||||
|
|
|
@ -34,7 +34,6 @@ public class WhatsNewDialogFragment extends DialogFragment {
|
|||
builder.setPositiveButton(R.string.read_more, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
SHOW = false;
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(AppInitializer.LATEST_CHANGES_URL));
|
||||
startActivity(i);
|
||||
|
|
Loading…
Reference in a new issue