• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AppRater类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.codechimp.apprater.AppRater的典型用法代码示例。如果您正苦于以下问题:Java AppRater类的具体用法?Java AppRater怎么用?Java AppRater使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AppRater类属于org.codechimp.apprater包,在下文中一共展示了AppRater类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onNavigationItemSelected

import org.codechimp.apprater.AppRater; //导入依赖的package包/类
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
    // handle navigation view item clicks here
    int id = item.getItemId();
    if (id == R.id.nav_rate_this_app) { // easter egg - option to load home fragment without using cache data
        // rate my app dialog
        AppRater.rateNow(this);
    } else if (id == R.id.nav_subscribe_to_newsletter) {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.mailing_list_url)));
        if (intent.resolveActivity(getPackageManager()) != null) {
            startActivity(intent);
        }
    } else {
        // replace fragment if it's not already visible
        FragmentUtils.loadFragment(this, getFragmentManager(), navigation, id, currentFragment);
    }

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    drawer.closeDrawer(GravityCompat.START);
    return true;
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:22,代码来源:MainActivity.java


示例2: onCreate

import org.codechimp.apprater.AppRater; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //Making Live map as default.
        currentMapType = AppConstants.MapType.LIVE;

        if (savedInstanceState != null) {
            // Restore values from saved state
            currentPage = savedInstanceState.getInt(BUNDLE_MAP_ID, 0);
            currentMapType = AppConstants.MapType.values()[savedInstanceState.getInt(BUNDLE_MAP_TYPE, 0)];
        }

        activeDownloadsList = new ConcurrentHashMap<String, Integer>();
//        WeatherApplication.analyticsHandler.trackScreen(getString(R.string.home_page));
        AppRater.app_launched(this);

        changeLogLib = new ChangeLog(this);
        if (changeLogLib.isFirstRun()) {
//            changeLogLib.getLogDialog().show();
            changeLogLib.getFullLogDialog().show();
        }
    }
 
开发者ID:Shahul3D,项目名称:IndiaSatelliteWeather,代码行数:24,代码来源:MainMapActivity.java


示例3: handlePrefClick

import org.codechimp.apprater.AppRater; //导入依赖的package包/类
private boolean handlePrefClick(Preference preference) {
  if (preference.getKey().equals("credits")) {
    CreditsActivity.show(getActivity());
    return true;
  } else if (preference.getKey().equals("rate")) {
    AppRater.rateNow(getActivity());
    return true;
  } else if (preference.getKey().equals("log")) {
    ChangeLogDialog.showChangeLog(getActivity());
    return true;
  } else if (preference.getKey().equals("intro")) {
    IntroActivity.showIntro(getActivity(), true);
    return true;
  } else if (preference.getKey().equals("feedback")) {
    Utils.sendFeedbackEmail(getActivity());
    return true;
  }

  return false;
}
 
开发者ID:sgehrman,项目名称:UTubeTV,代码行数:21,代码来源:SettingsActivity.java


示例4: rateApp

import org.codechimp.apprater.AppRater; //导入依赖的package包/类
private void rateApp() {
        AppRater.app_launched(getAttachedActivity());
        AppRater.setLightTheme();
//        AppRater.setVersionCodeCheckEnabled(true);
        AppRater.setNumLaunchesForRemindLater(1);
//        AppRater.showRateDialog(getAttachedActivity());
    }
 
开发者ID:nantaphop,项目名称:AomYim-Pantip,代码行数:8,代码来源:ForumHolderFragment.java


示例5: onCreate

import org.codechimp.apprater.AppRater; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (BuildConfig.ENABLE_RATING) {
        AppRater.app_launched(getActivity());
    }
}
 
开发者ID:matthew-compton,项目名称:Petfinder,代码行数:8,代码来源:MainFragment.java


示例6: onCreate

import org.codechimp.apprater.AppRater; //导入依赖的package包/类
/**
 * Called when the activity is first created.
 */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d(TAG, "Creating main activity...");

    if (SealnoteApplication.getDatabase().getPassword() == null) {
        // onResume will follow up which will start PasswordActivity and setup database password
        Log.d(TAG, "Password can't be found while creating activity. Start PasswordActivity");
        return;
    }

    /* Handle saved state */
    if (savedInstanceState != null) {
        String folder = savedInstanceState.getString("SN_FOLDER", Note.Folder.FOLDER_LIVE.name());
        mCurrentFolder = Note.Folder.valueOf(folder);
        mTagId = savedInstanceState.getInt("SN_TAGID", -1);
        // This only makes sense when mTagId != -1
        mTagName = savedInstanceState.getString("SN_TAGNAME", null);
    } else {
        mCurrentFolder = Note.Folder.FOLDER_LIVE;
        mTagId = -1;
    }

    /* Load and initialize views */
    setContentView(R.layout.main);
    Misc.secureWindow(this);

    loadNotesView();
    initNavigationDrawer();

    /* Shared Preferences */
    SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
    sharedPrefs.registerOnSharedPreferenceChangeListener(this);

    /* Setup ActionBar */
    ActionBar actionBar = getActionBar();
    if (actionBar == null)
        return;
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setHomeButtonEnabled(true);

    if (mCurrentFolder != Note.Folder.FOLDER_TAG) {
        //FIXME: Cleanup
        actionBar.setTitle(getResources().getStringArray(
                R.array.navigation_drawer
        )[mCurrentFolder.ordinal() - 1]);
    } else {
        actionBar.setTitle(mTagName);
    }

    AppRater.app_launched(this);
}
 
开发者ID:vishesh,项目名称:sealnote,代码行数:56,代码来源:SealnoteActivity.java


示例7: showRateAppDialog

import org.codechimp.apprater.AppRater; //导入依赖的package包/类
private void showRateAppDialog(Context context) {
    AppRater.setDontRemindButtonVisible(true);
    AppRater.showRateDialog(context);
    WeatherApplication.analyticsHandler.trackScreen(getString(R.string.rating_page));
}
 
开发者ID:Shahul3D,项目名称:IndiaSatelliteWeather,代码行数:6,代码来源:MainMapActivity.java


示例8: onCreate

import org.codechimp.apprater.AppRater; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
  // we set the activity to NoActionBar in the manifest to avoid the title flickering in the actionbar
  setTheme(R.style.DrawerActivityTheme);
  super.onCreate(savedInstanceState);

  setContentView(R.layout.activity_drawer);

  mContent = Content.instance(this);

  if (mContent.needsChannelSwitcher()) {
    mActionBarSpinnerAdapter = new ActionBarSpinnerAdapter(this, mContent);
    ActionBar.OnNavigationListener listener = new ActionBar.OnNavigationListener() {
      @Override
      public boolean onNavigationItemSelected(int position, long itemId) {

        // be aware that this call back gets called when the spinner contents are built
        // we need to ignore that one, so not going to do anything if channel not changing
        if (!mSpinnerSucksBalls) {
          mSpinnerSucksBalls = true;

          // ## taking advantage of this feature/bug to set the real value of the actionbar spinner
          // if we don't do this, the spinner defaults to value 0, so selecting the first item
          // in the list will not work since it doesn't respond when selecting the same index as the current value
          getActionBar().setSelectedNavigationItem(mContent.currentChannelIndex());
        } else {
          if (mContent.changeChannel(position))
            updateSectionForChannel();
        }
        return true;
      }
    };

    getActionBar().setDisplayShowTitleEnabled(false);
    getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    getActionBar().setListNavigationCallbacks(mActionBarSpinnerAdapter, listener);
  }

  setupDrawer();

  // enable ActionBar app icon to behave as action to toggle nav drawer
  getActionBar().setDisplayHomeAsUpEnabled(true);

  selectSection(mContent.savedSectionIndex(), false);

  if (Constants.showAppRater) {
    AppRater.app_launched(this);
  }

  // general app tweaks
  //    Debug.activateStrictMode();
  Utils.ignoreObsoleteCapacitiveMenuButton(this);

  // show player if activity was destroyed and recreated
  if (savedInstanceState != null) {
    VideoPlayer.PlayerParams params = savedInstanceState.getParcelable("player_params");

    if (params != null)
      playVideo(params);
  }

  WhatsNewDialog.showWhatsNew(this, false);

  // only show intro for multi channels
  if (mContent.needsChannelSwitcher())
    IntroActivity.showIntroDelayed(this, false);
}
 
开发者ID:sgehrman,项目名称:UTubeTV,代码行数:68,代码来源:DrawerActivity.java



注:本文中的org.codechimp.apprater.AppRater类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RsForward类代码示例发布时间:2022-05-22
下一篇:
Java RequestAuthCache类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap