new file layout and bottomsheet link
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user