diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 3b2337c4..036e310e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -11,8 +11,11 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
+
@@ -61,8 +64,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/java/org/mian/gitnex/activities/NewFileActivity.java b/app/src/main/java/org/mian/gitnex/activities/NewFileActivity.java
new file mode 100644
index 00000000..f1881b5e
--- /dev/null
+++ b/app/src/main/java/org/mian/gitnex/activities/NewFileActivity.java
@@ -0,0 +1,22 @@
+package org.mian.gitnex.activities;
+
+import android.os.Bundle;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+import org.mian.gitnex.R;
+
+/**
+ * Author M M Arif
+ */
+
+public class NewFileActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_new_file);
+ Toolbar toolbar = findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+ }
+
+}
diff --git a/app/src/main/java/org/mian/gitnex/activities/RepoDetailActivity.java b/app/src/main/java/org/mian/gitnex/activities/RepoDetailActivity.java
index 02a227d3..0e845ef9 100644
--- a/app/src/main/java/org/mian/gitnex/activities/RepoDetailActivity.java
+++ b/app/src/main/java/org/mian/gitnex/activities/RepoDetailActivity.java
@@ -108,7 +108,6 @@ public class RepoDetailActivity extends AppCompatActivity implements RepoBottomS
}
}
-
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
@@ -165,6 +164,9 @@ public class RepoDetailActivity extends AppCompatActivity implements RepoBottomS
Intent i = new Intent(Intent.ACTION_VIEW, url);
startActivity(i);
break;
+ case "newFile":
+ startActivity(new Intent(RepoDetailActivity.this, NewFileActivity.class));
+ break;
}
}
diff --git a/app/src/main/java/org/mian/gitnex/fragments/RepoBottomSheetFragment.java b/app/src/main/java/org/mian/gitnex/fragments/RepoBottomSheetFragment.java
index efa9ab81..c2866e1f 100644
--- a/app/src/main/java/org/mian/gitnex/fragments/RepoBottomSheetFragment.java
+++ b/app/src/main/java/org/mian/gitnex/fragments/RepoBottomSheetFragment.java
@@ -30,6 +30,7 @@ public class RepoBottomSheetFragment extends BottomSheetDialogFragment {
TextView addCollaborator = v.findViewById(R.id.addCollaborator);
TextView createRelease = v.findViewById(R.id.createRelease);
TextView openWebRepo = v.findViewById(R.id.openWebRepo);
+ TextView newFile = v.findViewById(R.id.newFile);
createLabel.setOnClickListener(new View.OnClickListener() {
@Override
@@ -79,6 +80,14 @@ public class RepoBottomSheetFragment extends BottomSheetDialogFragment {
}
});
+ newFile.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ bmListener.onButtonClicked("newFile");
+ dismiss();
+ }
+ });
+
return v;
}
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
index 5a4a7c8e..15c882c4 100644
--- a/app/src/main/res/layout/activity_login.xml
+++ b/app/src/main/res/layout/activity_login.xml
@@ -61,7 +61,6 @@
android:padding="10dp"
android:textSize="14sp"
tools:ignore="Autofill"
- android:labelFor="@+id/instance_url"
android:background="@drawable/shape_inputs"
android:drawableStart="@drawable/ic_link_24dp"
android:drawablePadding="10dp"
@@ -79,7 +78,6 @@
android:padding="10dp"
android:textSize="14sp"
tools:ignore="Autofill"
- android:labelFor="@+id/login_uid"
android:background="@drawable/shape_inputs"
android:drawableStart="@drawable/ic_person_24dp"
android:drawablePadding="10dp"
@@ -97,7 +95,6 @@
android:padding="10dp"
android:textSize="14sp"
tools:ignore="Autofill"
- android:labelFor="@+id/login_passwd"
android:background="@drawable/shape_inputs"
android:drawableStart="@drawable/ic_lock_24dp"
android:drawablePadding="10dp"
@@ -115,7 +112,6 @@
android:padding="10dp"
android:textSize="14sp"
tools:ignore="Autofill"
- android:labelFor="@+id/otpCode"
android:background="@drawable/shape_inputs"
android:drawableStart="@drawable/ic_otp"
android:drawablePadding="10dp"
diff --git a/app/src/main/res/layout/activity_new_file.xml b/app/src/main/res/layout/activity_new_file.xml
new file mode 100644
index 00000000..5eeb0f1c
--- /dev/null
+++ b/app/src/main/res/layout/activity_new_file.xml
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/repo_bottom_sheet_layout.xml b/app/src/main/res/layout/repo_bottom_sheet_layout.xml
index 6b1db484..225837ef 100644
--- a/app/src/main/res/layout/repo_bottom_sheet_layout.xml
+++ b/app/src/main/res/layout/repo_bottom_sheet_layout.xml
@@ -7,6 +7,18 @@
android:background="@color/backgroundColor"
android:paddingTop="8dp">
+
+
My Repositories
Repositories
Profile
- Create Repository
+ New Repository
Organizations
Issues
Settings
- Create Organization
- Create Milestone
- Create Issue
- Create Label
+ New Organization
+ New Milestone
+ New Issue
+ New Label
Credits
Update Label
Sponsors
Starred Repositories
- Create Team
+ New Team
Add Email Address
+ New File
Version\u0020:\u0020
@@ -260,7 +261,7 @@
No more data available.
- Create Label
+ New Label
Repo Menu
Label Name
Label Color
@@ -299,7 +300,7 @@
Repositories
Teams
Members
- Create Team
+ New Team
No teams found
Team name
Team desc
@@ -387,7 +388,7 @@
Repository Meta
- Create New User
+ Add New User
Users
Admin
@@ -400,7 +401,7 @@
Invalid Full Name
Invalid Username
Invalid Email
- New user created successfully
+ New user added successfully
User already exists
@@ -416,7 +417,7 @@
- Create Release
+ New Release
Tag Name
Title
Content
@@ -446,6 +447,14 @@
Zip Archive
Tar Archive
+
+ File Name
+ Branch Name
+ File Content
+ Create New File
+ with folder: app/test.md
+ Commit Message
+
OK
Done
@@ -468,6 +477,7 @@
Description
Website
Location
+ Max 255 characters