Subversion Repositories SmartDukaan

Rev

Rev 22132 | Rev 22832 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22132 Rev 22381
Line 330... Line 330...
330
            catch (Exception e){
330
            catch (Exception e){
331
                e.printStackTrace();
331
                e.printStackTrace();
332
            }
332
            }
333
        }
333
        }
334
 
334
 
335
       /* getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.WHITE));
335
       getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.WHITE));
336
        //getSupportActionBar().setIcon(R.drawable.backarrow);
336
        //getSupportActionBar().setIcon(R.drawable.backarrow);
337
        getSupportActionBar().setDisplayShowCustomEnabled(true);
337
        getSupportActionBar().setDisplayShowCustomEnabled(true);
338
        getSupportActionBar().setDisplayShowTitleEnabled(false);
338
        getSupportActionBar().setDisplayShowTitleEnabled(false);
339
        final Drawable upArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
339
        final Drawable upArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
340
        upArrow.setColorFilter(getResources().getColor(R.color.grey_black), PorterDuff.Mode.SRC_ATOP);
340
        upArrow.setColorFilter(getResources().getColor(R.color.grey_black), PorterDuff.Mode.SRC_ATOP);
341
        getSupportActionBar().setHomeAsUpIndicator(upArrow);
341
        getSupportActionBar().setHomeAsUpIndicator(upArrow);
342
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
342
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
343
        getSupportActionBar().setHomeButtonEnabled(true);
343
        getSupportActionBar().setHomeButtonEnabled(true);
344
        getSupportActionBar().setCustomView(R.layout.actionbarprofittill);*/
344
        getSupportActionBar().setCustomView(R.layout.actionbarprofittill);
345
 
345
 
346
        try {
346
        try {
347
            ViewConfiguration config = ViewConfiguration.get(this);
347
            ViewConfiguration config = ViewConfiguration.get(this);
348
            Field menuKeyField = ViewConfiguration.class
348
            Field menuKeyField = ViewConfiguration.class
349
                    .getDeclaredField("sHasPermanentMenuKey");
349
                    .getDeclaredField("sHasPermanentMenuKey");
Line 707... Line 707...
707
            notifciationCount.setVisibility(View.GONE);
707
            notifciationCount.setVisibility(View.GONE);
708
        }*/
708
        }*/
709
        return true;
709
        return true;
710
    }
710
    }
711
 
711
 
712
    @Override
712
   /* @Override
713
    public boolean onOptionsItemSelected(MenuItem item) {
713
    public boolean onOptionsItemSelected(MenuItem item) {
714
        Fragment menuFragment= null;
714
        Fragment menuFragment= null;
715
        JSONObject props = new JSONObject();
715
        JSONObject props = new JSONObject();
716
        Bundle args = new Bundle();
716
        Bundle args = new Bundle();
717
        String id = userData.getString("id",null);
717
        String id = userData.getString("id",null);
718
        /*if (mDrawerToggle.onOptionsItemSelected(item)) {
718
        /*if (mDrawerToggle.onOptionsItemSelected(item)) {
719
            return true;
719
            return true;
720
        }
720
        }
721
*/
721
 
722
        switch (item.getItemId()) {
722
        switch (item.getItemId()) {
723
            // Respond to the action bar's Up/Home button
723
            // Respond to the action bar's Up/Home button
724
            case android.R.id.home:
724
            case android.R.id.home:
725
                new AlertDialog.Builder(this)
725
                new AlertDialog.Builder(this)
726
                        .setIcon(android.R.drawable.ic_dialog_alert)
726
                        .setIcon(android.R.drawable.ic_dialog_alert)
Line 737... Line 737...
737
                            }
737
                            }
738
                        })
738
                        })
739
                        .setNegativeButton("No", null)
739
                        .setNegativeButton("No", null)
740
                        .show();
740
                        .show();
741
        }
741
        }
742
        return super.onOptionsItemSelected(item);
742
        return super.onOptionsItemSelected(item);*/
743
 
743
 
744
           /* case R.id.action_settings:
744
           /* case R.id.action_settings:
745
                AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
745
                AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
746
                Intent i = new Intent(this, PollingService.class);
746
                Intent i = new Intent(this, PollingService.class);
747
                PendingIntent pi = PendingIntent.getService(this, 0, i, 0);
747
                PendingIntent pi = PendingIntent.getService(this, 0, i, 0);
Line 913... Line 913...
913
                        .commit();
913
                        .commit();
914
 
914
 
915
                return true;*/
915
                return true;*/
916
          /* default:*/
916
          /* default:*/
917
        // return super.onOptionsItemSelected(item);
917
        // return super.onOptionsItemSelected(item);
918
    }
918
 
919
 
919
 
920
 
920
 
921
 
921
 
922
 
922
 
923
    @Override
923
    @Override
Line 994... Line 994...
994
                        .build());
994
                        .build());
995
                new Analytics(ProfitTillConstants.ANALYTICS_URL,
995
                new Analytics(ProfitTillConstants.ANALYTICS_URL,
996
                        AnalyticsUtility.getAnalyticsRequest(MainActivity.this,userData.getString("id",""),"Menu","Deals","Deals Clicked"),
996
                        AnalyticsUtility.getAnalyticsRequest(MainActivity.this,userData.getString("id",""),"Menu","Deals","Deals Clicked"),
997
                        AnalyticsJsonResponse.getAnalyticsRequestInstance(),
997
                        AnalyticsJsonResponse.getAnalyticsRequestInstance(),
998
                        AnalyticsErrorResponse.getAnalyitcsResponseInstance()).anlyticsRequest(MainActivity.this);
998
                        AnalyticsErrorResponse.getAnalyitcsResponseInstance()).anlyticsRequest(MainActivity.this);
999
                String dealsUrl=apiData.getString("Web_Uri","http://pm.shop2020.in/entry-point");
999
                String dealsUrl=apiData.getString("Web_Uri","http://app.profitmandi.com/entry-point");
1000
                //String dealsUrl="http://192.168.120.96:4200/entry-point";
1000
                //String dealsUrl="http://192.168.120.96:4200/entry-point";
1001
                //String dealsUrl=ProfitTillConstants.Web_Uri;
1001
                //String dealsUrl=ProfitTillConstants.Web_Uri;
1002
                args.putString("key",dealsUrl);
1002
                args.putString("key",dealsUrl);
1003
                fragment = new DealsHomeFragment();
1003
                fragment = new DealsHomeFragment();
1004
                fragment.setArguments(args);
1004
                fragment.setArguments(args);