本文整理了Java中com.squareup.picasso.Picasso.setLoggingEnabled()
方法的一些代码示例,展示了Picasso.setLoggingEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Picasso.setLoggingEnabled()
方法的具体详情如下:
包路径:com.squareup.picasso.Picasso
类名称:Picasso
方法名:setLoggingEnabled
暂无
代码示例来源:origin: siyamed/android-shape-imageview
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_list_sample, container, false);
final Picasso picasso = Picasso.with(getActivity());
picasso.setLoggingEnabled(true);
picasso.setIndicatorsEnabled(false);
int listLayout = getArguments().getInt(ARG_LAYOUT);
final ListView listView = (ListView) view.findViewById(R.id.list);
Adapter adapter = new Adapter(getActivity(), picasso, listLayout);
listView.setAdapter(adapter);
return view;
}
代码示例来源:origin: siyamed/android-shape-imageview
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_chat_sample, container, false);
final Picasso picasso = Picasso.with(getActivity());
picasso.setLoggingEnabled(true);
picasso.setIndicatorsEnabled(false);
int listLayout1 = getArguments().getInt(ARG_LAYOUT_1);
int listLayout2 = getArguments().getInt(ARG_LAYOUT_2);
final ListView listView = (ListView) view.findViewById(R.id.list);
Adapter adapter = new Adapter(getActivity(), picasso, listLayout1, listLayout2);
listView.setAdapter(adapter);
return view;
}
代码示例来源:origin: stackoverflow.com
import android.app.Application;
import com.squareup.picasso.OkHttpDownloader;
import com.squareup.picasso.Picasso;
public class Global extends Application {
@Override
public void onCreate() {
super.onCreate();
Picasso.Builder builder = new Picasso.Builder(this);
builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
Picasso built = builder.build();
built.setIndicatorsEnabled(true);
built.setLoggingEnabled(true);
Picasso.setSingletonInstance(built);
}
}
代码示例来源:origin: stackoverflow.com
final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
// Use 1/8th of the available memory for this memory cache.
final int cacheSize = maxMemory / 8;
Picasso.Builder builder = new Picasso.Builder(getApplicationContext());
builder.memoryCache(new LruCache(cacheSize));
Picasso built = builder.build();
built.setIndicatorsEnabled(true);// it will show indicator where it downloaded from
built.setLoggingEnabled(false);
Picasso.setSingletonInstance(built);
代码示例来源:origin: stackoverflow.com
Picasso picasso = Picasso.with(TestActivity.this);
picasso.clearDiskCache();
picasso.setDebugging(true);
picasso.setIndicatorsEnabled(true);
picasso.setLoggingEnabled(true);
picasso.load(imageURL).into(imageView);
代码示例来源:origin: zendesk/sdk_demo_app_android
@Override
public void onCreate() {
super.onCreate();
storage = new AppStorage(this);
Picasso.with(this).setLoggingEnabled(true);
// Enable logging in Support and Chat SDK
Logger.setLoggable(true);
// Init Support SDK
Zendesk.INSTANCE.init(this, getResources().getString(R.string.zd_url),
getResources().getString(R.string.zd_appid),
getResources().getString(R.string.zd_oauth));
Support.INSTANCE.init(Zendesk.INSTANCE);
// Init Chat SDK
if ("replace_me_chat_account_id".equals(getString(R.string.zopim_account_id))) {
Log.w(LOG_TAG, "==============================================================================================================");
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'");
Log.w(LOG_TAG, "==============================================================================================================");
}
ZopimChat.init(getString(R.string.zopim_account_id));
}
代码示例来源:origin: TUM-Dev/Campus-Android
protected void setupPicasso() {
Picasso.Builder builder = new Picasso.Builder(this);
builder.downloader(new OkHttp3Downloader(this, Integer.MAX_VALUE));
Picasso built = builder.build();
built.setLoggingEnabled(true);
Picasso.setSingletonInstance(built);
}
代码示例来源:origin: stackoverflow.com
Picasso.Builder builder = new Picasso.Builder(this);
builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
Picasso picasso = builder.build();
picasso.setIndicatorsEnabled(true);
picasso.setLoggingEnabled(true);
Picasso.setSingletonInstance(picasso);
代码示例来源:origin: stackoverflow.com
public class Global extends Application {
@Override
public void onCreate() {
super.onCreate();
Picasso.Builder builder = new Picasso.Builder(this);
builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
Picasso built = builder.build();
built.setIndicatorsEnabled(false);
built.setLoggingEnabled(true);
Picasso.setSingletonInstance(built);
}
}
代码示例来源:origin: stackoverflow.com
public class YourApp extends Application {
@Override
public void onCreate() {
super.onCreate();
Picasso.Builder builder = new Picasso.Builder(this);
builder.downloader(new OkHttpDownloader(this, Integer.MAX_VALUE));
Picasso built = builder.build();
built.setIndicatorsEnabled(true);
built.setLoggingEnabled(true);
Picasso.setSingletonInstance(built);
}
}
代码示例来源:origin: akshayejh/Lapit---Android-Firebase-Chat-App
@Override
public void onCreate() {
super.onCreate();
FirebaseDatabase.getInstance().setPersistenceEnabled(true);
/* Picasso */
Picasso.Builder builder = new Picasso.Builder(this);
builder.downloader(new OkHttpDownloader(this, Integer.MAX_VALUE));
Picasso built = builder.build();
built.setIndicatorsEnabled(true);
built.setLoggingEnabled(true);
Picasso.setSingletonInstance(built);
mAuth = FirebaseAuth.getInstance();
if(mAuth.getCurrentUser() != null) {
mUserDatabase = FirebaseDatabase.getInstance()
.getReference().child("Users").child(mAuth.getCurrentUser().getUid());
mUserDatabase.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
if (dataSnapshot != null) {
mUserDatabase.child("online").onDisconnect().setValue(ServerValue.TIMESTAMP);
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
}
}
内容来源于网络,如有侵权,请联系作者删除!