* to contain {@link FileDetailFragment#FILE} with an OCFile and also\r
* {@link FileDownloader#EXTRA_ACCOUNT} with the account.\r
* \r
* to contain {@link FileDetailFragment#FILE} with an OCFile and also\r
* {@link FileDownloader#EXTRA_ACCOUNT} with the account.\r
* \r
- * @param intent\r
- * The {@link Intent} that contains extra information about this\r
- * file The intent needs to have these extras:\r
+ * @param intent The {@link Intent} that contains extra information about\r
+ * this file The intent needs to have these extras:\r
ImageView imageView = (ImageView) getView().findViewById(\r
R.id.imageView2);\r
imageView.setImageResource(R.drawable.download);\r
imageView.setOnClickListener(this);\r
} else {\r
if (mFile.getMimetype().startsWith("image/")) {\r
ImageView imageView = (ImageView) getView().findViewById(\r
R.id.imageView2);\r
imageView.setImageResource(R.drawable.download);\r
imageView.setOnClickListener(this);\r
} else {\r
if (mFile.getMimetype().startsWith("image/")) {\r
imageView.setImageBitmap(bmp);\r
} else if (mFile.getMimetype().startsWith("video/")) {\r
videoView.setVisibility(View.VISIBLE);\r
imageView.setImageBitmap(bmp);\r
} else if (mFile.getMimetype().startsWith("video/")) {\r
videoView.setVisibility(View.VISIBLE);\r
public View onCreateView(LayoutInflater inflater, ViewGroup container,\r
Bundle savedInstanceState) {\r
View view = null;\r
public View onCreateView(LayoutInflater inflater, ViewGroup container,\r
Bundle savedInstanceState) {\r
View view = null;\r
- public View getView() {\r
- return mView == null ? super.getView() : mView;\r
- };\r
+ public void onStart() {\r
+ super.onStart();\r
+ \r
+ // Fill in required information about file displaying\r
+ if(mIntent == null){\r
+ mIntent = getActivity().getIntent();\r
+ }\r
+ \r
+ // Fill in the details if the layout is not empty\r
+ if(!mEmptyLayout){\r
+ updateFileDetails();\r
+ }\r
+ \r
+ }\r
\r
private void setFilename(String filename) {\r
TextView tv = (TextView) getView().findViewById(R.id.textView1);\r
\r
private void setFilename(String filename) {\r
TextView tv = (TextView) getView().findViewById(R.id.textView1);\r