我的客户想要一个像这样的菱形进度:
我的第一次尝试是使用图书馆,但我找不到存在的图书馆
我的下一个尝试是学习如何使用ProgressBarandroid 附带的视图,并使用这个答案(最接近堆栈溢出的答案)设置我自己的可绘制对象,但该答案仅适用于ring形状,而不适用于矩形。
创建菱形进度视图的最佳方法是什么?(无论如何:自定义视图,progressDrawable)我该怎么做?
我想ProgressBar为我显示一个WebView,它应该在加载完成后停止,这是我的代码,但是当我调用ProgressBar它时显示无法解析方法findViewById
package com.fb.jaisonjoseph.facebookbasic;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
/**
* A simple {@link Fragment} subclass.
*/
public class Home_Fragment extends Fragment {
public WebView mwebView;
public Home_Fragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_home_, null); …Run Code Online (Sandbox Code Playgroud)