Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
* Added fragment separator
Browse files Browse the repository at this point in the history
* Added status progress bar when gettting torrent's general info
* Fixed General Info retrieval issue
  • Loading branch information
lgallard committed Oct 21, 2014
1 parent 1136819 commit 8bcca58
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 30 deletions.
4 changes: 2 additions & 2 deletions qBittorrentClient/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lgallardo.qbittorrentclient"
android:versionCode="240"
android:versionName="2.4.0" >
android:versionCode="241"
android:versionName="2.4.1" >

<uses-sdk
android:minSdkVersion="14"
Expand Down
8 changes: 7 additions & 1 deletion qBittorrentClient/res/layout-large/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
http://www.gnu.org/licenses/gpl.html
Contributors:
Luis M. Gallardo D. - initial implementation
Luis M. Gallardo D.
-->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
Expand Down Expand Up @@ -43,6 +43,7 @@
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_above="@+id/adView"
android:layout_below="@+id/progressBarConnecting"
android:baselineAligned="false"
android:orientation="horizontal" >

Expand All @@ -52,6 +53,11 @@
android:layout_height="match_parent"
android:layout_weight="1" />

<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="@android:color/darker_gray" />

<FrameLayout
android:id="@+id/content_frame"
android:layout_width="0dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="20dp" >
android:paddingTop="10dp" >

<ListView
android:id="@android:id/list"
Expand Down
2 changes: 1 addition & 1 deletion qBittorrentClient/res/layout-large/torrent_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="20dp"
android:paddingTop="10dp"
tools:context=".TorrentActionsActivity" >

<LinearLayout
Expand Down
5 changes: 4 additions & 1 deletion qBittorrentClient/res/layout/about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="41dp"
android:layout_marginTop="25dp"
android:contentDescription="@string/app_name"
android:paddingRight="10dp"
android:src="@drawable/ic_launcher" />
Expand Down Expand Up @@ -70,6 +70,7 @@
android:layout_below="@+id/textView1"
android:layout_marginTop="10dp"
android:padding="10dp"
android:layout_marginLeft="5dp"
android:text="@string/about_motto" />

<ImageView
Expand All @@ -78,6 +79,7 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignTop="@+id/textView3"
android:layout_marginLeft="5dp"
android:layout_marginTop="20dp"
android:contentDescription="@string/icon"
android:src="@drawable/ic_arrow" />
Expand All @@ -88,6 +90,7 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignTop="@+id/textView4"
android:layout_marginLeft="5dp"
android:layout_marginTop="20dp"
android:contentDescription="@string/icon"
android:src="@drawable/ic_refresh" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public class MainActivity extends FragmentActivity {
// Searching field
private String searchField = "";

protected ProgressBar progressBar;
protected static ProgressBar progressBar;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
// TODO Auto-generated catch block
Log.e("TorrentDetailsFragment - onCreateView", e.toString());
}

// Show progressBar
if (MainActivity.progressBar != null) {
MainActivity.progressBar.setVisibility(View.VISIBLE);
}

// Load banner
loadBanner();
Expand Down Expand Up @@ -255,20 +260,6 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
// Load Banner
public void loadBanner() {

// LinearLayout linearLayout = null;

// linearLayout.removeView(adView);
//
// LinearLayout.LayoutParams adsParams = new
// LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,
// LinearLayout.LayoutParams.WRAP_CONTENT,
// android.view.Gravity.BOTTOM |
// android.view.Gravity.CENTER_HORIZONTAL);
//
//
// linearLayout.addView(adView, adsParams);
//

// Get the adView.
adView = (AdView) getActivity().findViewById(R.id.adView);

Expand All @@ -293,15 +284,6 @@ protected View[] doInBackground(View... rootViews) {

json2 = jParser.getJSONFromUrl(url + hash);

// // If no data, throw exception
// if (json2 == null || json2.length() == 0) {
//
// Log.i("TorrentFragment", "JSON Empty");
// // throw (new Exception());
// json2 = null;
//
// }

MainActivity.lines[position].setSavePath(json2.getString(MainActivity.TAG_SAVE_PATH));
MainActivity.lines[position].setCreationDate(json2.getString(MainActivity.TAG_CREATION_DATE));
MainActivity.lines[position].setComment(json2.getString(MainActivity.TAG_COMMENT));
Expand Down Expand Up @@ -389,6 +371,12 @@ protected void onPostExecute(View[] rootViews) {
// TODO Auto-generated catch block

}


// Hide progressBar
if (MainActivity.progressBar != null) {
MainActivity.progressBar.setVisibility(View.INVISIBLE);
}

}

Expand Down

0 comments on commit 8bcca58

Please sign in to comment.