-1
public class HomeFragment extends BasePageFragment {
private Unbinder unbinder;
// @BindView(R.id.fab)
// FloatingActionButton mFab;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_homepage, container, false);
ImageButton ImageButton = (ImageButton) FindViewById (R.id.imageButton);
ImageButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Uri uri = Uri.parse("https://play.google.com/store/apps/details?id=com.mowmo.minimale");
startActivity(new Intent(Intent.ACTION_VIEW, uri));
}
});
}
歡迎來到Stack Overflow!爲了給你一個很好的答案,如果你有一個[問],如果你還沒有看過,它可能會幫助我們。如果你可以提供[mcve],它可能也很有用。 – Mat
你的錯誤是什麼?它是編譯器錯誤還是運行時錯誤? – ykaragol
這裏有很多錯誤。閱讀編譯錯誤以瞭解它們。 (返回後的語句,'FindViewById' not found,not sure the compiler will see the difference between'ImageButton' and'ImageButton') – AxelH