com.squareup.picasso.Picasso.setLoggingEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中com.squareup.picasso.Picasso.setLoggingEnabled()方法的一些代码示例,展示了Picasso.setLoggingEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Picasso.setLoggingEnabled()方法的具体详情如下:
包路径:com.squareup.picasso.Picasso
类名称:Picasso
方法名:setLoggingEnabled

Picasso.setLoggingEnabled介绍

暂无

代码示例

代码示例来源:origin: siyamed/android-shape-imageview

  1. @Override
  2. public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  3. View view = inflater.inflate(R.layout.fragment_list_sample, container, false);
  4. final Picasso picasso = Picasso.with(getActivity());
  5. picasso.setLoggingEnabled(true);
  6. picasso.setIndicatorsEnabled(false);
  7. int listLayout = getArguments().getInt(ARG_LAYOUT);
  8. final ListView listView = (ListView) view.findViewById(R.id.list);
  9. Adapter adapter = new Adapter(getActivity(), picasso, listLayout);
  10. listView.setAdapter(adapter);
  11. return view;
  12. }

代码示例来源:origin: siyamed/android-shape-imageview

  1. @Override
  2. public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  3. View view = inflater.inflate(R.layout.fragment_chat_sample, container, false);
  4. final Picasso picasso = Picasso.with(getActivity());
  5. picasso.setLoggingEnabled(true);
  6. picasso.setIndicatorsEnabled(false);
  7. int listLayout1 = getArguments().getInt(ARG_LAYOUT_1);
  8. int listLayout2 = getArguments().getInt(ARG_LAYOUT_2);
  9. final ListView listView = (ListView) view.findViewById(R.id.list);
  10. Adapter adapter = new Adapter(getActivity(), picasso, listLayout1, listLayout2);
  11. listView.setAdapter(adapter);
  12. return view;
  13. }

代码示例来源:origin: stackoverflow.com

  1. import android.app.Application;
  2. import com.squareup.picasso.OkHttpDownloader;
  3. import com.squareup.picasso.Picasso;
  4. public class Global extends Application {
  5. @Override
  6. public void onCreate() {
  7. super.onCreate();
  8. Picasso.Builder builder = new Picasso.Builder(this);
  9. builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
  10. Picasso built = builder.build();
  11. built.setIndicatorsEnabled(true);
  12. built.setLoggingEnabled(true);
  13. Picasso.setSingletonInstance(built);
  14. }
  15. }

代码示例来源:origin: stackoverflow.com

  1. final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
  2. // Use 1/8th of the available memory for this memory cache.
  3. final int cacheSize = maxMemory / 8;
  4. Picasso.Builder builder = new Picasso.Builder(getApplicationContext());
  5. builder.memoryCache(new LruCache(cacheSize));
  6. Picasso built = builder.build();
  7. built.setIndicatorsEnabled(true);// it will show indicator where it downloaded from
  8. built.setLoggingEnabled(false);
  9. Picasso.setSingletonInstance(built);

代码示例来源:origin: stackoverflow.com

  1. Picasso picasso = Picasso.with(TestActivity.this);
  2. picasso.clearDiskCache();
  3. picasso.setDebugging(true);
  4. picasso.setIndicatorsEnabled(true);
  5. picasso.setLoggingEnabled(true);
  6. picasso.load(imageURL).into(imageView);

代码示例来源:origin: zendesk/sdk_demo_app_android

  1. @Override
  2. public void onCreate() {
  3. super.onCreate();
  4. storage = new AppStorage(this);
  5. Picasso.with(this).setLoggingEnabled(true);
  6. // Enable logging in Support and Chat SDK
  7. Logger.setLoggable(true);
  8. // Init Support SDK
  9. Zendesk.INSTANCE.init(this, getResources().getString(R.string.zd_url),
  10. getResources().getString(R.string.zd_appid),
  11. getResources().getString(R.string.zd_oauth));
  12. Support.INSTANCE.init(Zendesk.INSTANCE);
  13. // Init Chat SDK
  14. if ("replace_me_chat_account_id".equals(getString(R.string.zopim_account_id))) {
  15. Log.w(LOG_TAG, "==============================================================================================================");
  16. Log.w(LOG_TAG, "Zopim chat is not connected to an account, if you wish to try chat please add your Zopim accountId to 'zd.xml'");
  17. Log.w(LOG_TAG, "==============================================================================================================");
  18. }
  19. ZopimChat.init(getString(R.string.zopim_account_id));
  20. }

代码示例来源:origin: TUM-Dev/Campus-Android

  1. protected void setupPicasso() {
  2. Picasso.Builder builder = new Picasso.Builder(this);
  3. builder.downloader(new OkHttp3Downloader(this, Integer.MAX_VALUE));
  4. Picasso built = builder.build();
  5. built.setLoggingEnabled(true);
  6. Picasso.setSingletonInstance(built);
  7. }

代码示例来源:origin: stackoverflow.com

  1. Picasso.Builder builder = new Picasso.Builder(this);
  2. builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
  3. Picasso picasso = builder.build();
  4. picasso.setIndicatorsEnabled(true);
  5. picasso.setLoggingEnabled(true);
  6. Picasso.setSingletonInstance(picasso);

代码示例来源:origin: stackoverflow.com

  1. public class Global extends Application {
  2. @Override
  3. public void onCreate() {
  4. super.onCreate();
  5. Picasso.Builder builder = new Picasso.Builder(this);
  6. builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
  7. Picasso built = builder.build();
  8. built.setIndicatorsEnabled(false);
  9. built.setLoggingEnabled(true);
  10. Picasso.setSingletonInstance(built);
  11. }
  12. }

代码示例来源:origin: stackoverflow.com

  1. public class YourApp extends Application {
  2. @Override
  3. public void onCreate() {
  4. super.onCreate();
  5. Picasso.Builder builder = new Picasso.Builder(this);
  6. builder.downloader(new OkHttpDownloader(this, Integer.MAX_VALUE));
  7. Picasso built = builder.build();
  8. built.setIndicatorsEnabled(true);
  9. built.setLoggingEnabled(true);
  10. Picasso.setSingletonInstance(built);
  11. }
  12. }

代码示例来源:origin: akshayejh/Lapit---Android-Firebase-Chat-App

  1. @Override
  2. public void onCreate() {
  3. super.onCreate();
  4. FirebaseDatabase.getInstance().setPersistenceEnabled(true);
  5. /* Picasso */
  6. Picasso.Builder builder = new Picasso.Builder(this);
  7. builder.downloader(new OkHttpDownloader(this, Integer.MAX_VALUE));
  8. Picasso built = builder.build();
  9. built.setIndicatorsEnabled(true);
  10. built.setLoggingEnabled(true);
  11. Picasso.setSingletonInstance(built);
  12. mAuth = FirebaseAuth.getInstance();
  13. if(mAuth.getCurrentUser() != null) {
  14. mUserDatabase = FirebaseDatabase.getInstance()
  15. .getReference().child("Users").child(mAuth.getCurrentUser().getUid());
  16. mUserDatabase.addValueEventListener(new ValueEventListener() {
  17. @Override
  18. public void onDataChange(DataSnapshot dataSnapshot) {
  19. if (dataSnapshot != null) {
  20. mUserDatabase.child("online").onDisconnect().setValue(ServerValue.TIMESTAMP);
  21. }
  22. }
  23. @Override
  24. public void onCancelled(DatabaseError databaseError) {
  25. }
  26. });
  27. }
  28. }

相关文章