Skip to content

Commit

Permalink
v1.3 Added option to Download a single Post
Browse files Browse the repository at this point in the history
  • Loading branch information
AzeemIdrisi committed Oct 8, 2023
1 parent a1a1033 commit 0d88803
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions app/src/main/java/com/alphacorp/instaloader/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MainActivity : AppCompatActivity() {


val Box = findViewById<EditText>(R.id.inputBox)
val dl_status = findViewById<TextView>(R.id.textView2)
val dl_status = findViewById<TextView>(R.id.StatusText)
val Btn = findViewById<Button>(R.id.button)


Expand Down Expand Up @@ -89,7 +89,7 @@ class MainActivity : AppCompatActivity() {
"Something went wrong",
Toast.LENGTH_LONG
).show()
val show_error = findViewById<TextView>(R.id.textView2)
val show_error = findViewById<TextView>(R.id.StatusText)
val error_name = error.toString().split(":")
show_error.text = error_name.toString()
}
Expand All @@ -103,7 +103,7 @@ class MainActivity : AppCompatActivity() {
} catch (error: Throwable) {
Toast.makeText(this@MainActivity, "Something went wrong", Toast.LENGTH_LONG)
.show()
val show_error = findViewById<TextView>(R.id.textView2)
val show_error = findViewById<TextView>(R.id.StatusText)
val error_name = error.toString().split(":")
show_error.text = error_name[error_name.size - 1]
}
Expand All @@ -126,7 +126,7 @@ class MainActivity : AppCompatActivity() {
"Something went wrong",
Toast.LENGTH_LONG
).show()
val show_error = findViewById<TextView>(R.id.textView2)
val show_error = findViewById<TextView>(R.id.StatusText)
val error_name = error.toString().split(":")
show_error.text = error_name[error_name.size - 1]
}
Expand Down
31 changes: 23 additions & 8 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:id="@+id/Text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enter Instagram Username\nor a Post's Link"
android:text="Enter Instagram Username\nor Post Link"
android:textAlignment="center"
android:textSize="24sp"
android:textStyle="bold"
Expand Down Expand Up @@ -56,7 +56,7 @@
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="InstaLoaderApp v1.2"
android:text="InstaLoaderApp v1.3"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -77,29 +77,44 @@
app:layout_constraintVertical_bias="0.977" />

<TextView
android:id="@+id/textView2"
android:id="@+id/StatusText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
app:layout_constraintBottom_toTopOf="@+id/button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/inputBox"
app:layout_constraintVertical_bias="0.784" />
app:layout_constraintVertical_bias="0.545" />

<TextView
android:id="@+id/downloadLocationsText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Download Locations"
android:textAlignment="center"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.492"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.755" />

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Download Location for profile: InstaLoaderApp/username\nDownload Location for specific posts: InstaLoaderApp/posts"
android:text="Profiles: InstaLoaderApp/username\nPosts: InstaLoaderApp/posts"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.769" />
app:layout_constraintVertical_bias="0.811" />


<TextView
android:id="@+id/textView4"
Expand All @@ -110,7 +125,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.211" />
app:layout_constraintVertical_bias="0.172" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down

0 comments on commit 0d88803

Please sign in to comment.