mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-29 14:59:50 +00:00
Update
This commit is contained in:
parent
b47ad75d95
commit
afea81dfbe
12 changed files with 249 additions and 147 deletions
|
|
@ -35,6 +35,7 @@ import android.util.Log;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
|
@ -48,7 +49,9 @@ import java.net.URL;
|
|||
|
||||
public class AboutActivity extends AppCompatActivity implements View.OnClickListener{
|
||||
|
||||
Button btn_osl, btn_clog, btn_discord, btn_youtube, btn_github, btn_telegram, btn_instagram, btn_facebook;
|
||||
Button btn_osl, btn_clog;
|
||||
ImageButton btn_discord, btn_youtube, btn_github, btn_telegram, btn_instagram, btn_facebook;
|
||||
|
||||
String appInfo;
|
||||
|
||||
public String TAG = "AboutActivity";
|
||||
|
|
@ -58,21 +61,21 @@ public class AboutActivity extends AppCompatActivity implements View.OnClickList
|
|||
super.onCreate(savedInstanceState);
|
||||
UIUtils.edgeToEdge(this);
|
||||
setContentView(R.layout.activity_about);
|
||||
UIUtils.setOnApplyWindowInsetsListener(findViewById(R.id.main));
|
||||
// UIUtils.setOnApplyWindowInsetsListener(findViewById(R.id.main));
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
toolbar.setTitle(getResources().getString(R.string.about));
|
||||
//btn
|
||||
btn_telegram = (Button) findViewById(R.id.btn_telegram);
|
||||
btn_youtube = (Button) findViewById(R.id.btn_youtube);
|
||||
btn_github = (Button) findViewById(R.id.btn_github);
|
||||
btn_instagram = (Button) findViewById(R.id.btn_instagram);
|
||||
btn_facebook = (Button) findViewById(R.id.btn_facebook);
|
||||
btn_discord = (Button) findViewById(R.id.btn_discord);
|
||||
btn_osl = (Button) findViewById(R.id.btn_osl);
|
||||
btn_clog = (Button) findViewById(R.id.btn_changelog);
|
||||
btn_telegram = findViewById(R.id.btn_telegram);
|
||||
btn_youtube = findViewById(R.id.btn_youtube);
|
||||
btn_github = findViewById(R.id.btn_github);
|
||||
btn_instagram = findViewById(R.id.btn_instagram);
|
||||
btn_facebook = findViewById(R.id.btn_facebook);
|
||||
btn_discord = findViewById(R.id.btn_discord);
|
||||
btn_osl = findViewById(R.id.btn_osl);
|
||||
btn_clog = findViewById(R.id.btn_changelog);
|
||||
//onclicklistener
|
||||
btn_telegram.setOnClickListener(this);
|
||||
btn_github.setOnClickListener(this);
|
||||
|
|
@ -160,12 +163,12 @@ public class AboutActivity extends AppCompatActivity implements View.OnClickList
|
|||
}
|
||||
});
|
||||
|
||||
SimpleAnimations.scale(findViewById(R.id.card_yagiz), 250);
|
||||
SimpleAnimations.translationUpToDown(findViewById(R.id.card_yagiz), 250);
|
||||
SimpleAnimations.scale(findViewById(R.id.card_social), 500);
|
||||
SimpleAnimations.translationUpToDown(findViewById(R.id.card_social), 500);
|
||||
SimpleAnimations.scale(findViewById(R.id.developers), 750);
|
||||
SimpleAnimations.translationUpToDown(findViewById(R.id.developers), 750);
|
||||
// SimpleAnimations.scale(findViewById(R.id.card_yagiz), 250);
|
||||
// SimpleAnimations.translationUpToDown(findViewById(R.id.card_yagiz), 250);
|
||||
// SimpleAnimations.scale(findViewById(R.id.card_social), 500);
|
||||
// SimpleAnimations.translationUpToDown(findViewById(R.id.card_social), 500);
|
||||
// SimpleAnimations.scale(findViewById(R.id.developers), 750);
|
||||
// SimpleAnimations.translationUpToDown(findViewById(R.id.developers), 750);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import android.widget.Toast;
|
|||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
|
|
@ -185,7 +186,7 @@ public class CustomRomActivity extends AppCompatActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
UIUtils.edgeToEdge(this);
|
||||
setContentView(R.layout.activity_custom_rom);
|
||||
UIUtils.setOnApplyWindowInsetsListener(findViewById(R.id.main));
|
||||
// UIUtils.setOnApplyWindowInsetsListener(findViewById(R.id.main));
|
||||
activity = this;
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
|
@ -1205,7 +1206,7 @@ public class CustomRomActivity extends AppCompatActivity {
|
|||
|
||||
private void whenProcessing(boolean _isProcessing) {
|
||||
AppBarLayout appbar = findViewById(R.id.appbar);
|
||||
FrameLayout mainlayout = findViewById(R.id.mainlayout);
|
||||
CoordinatorLayout mainlayout = findViewById(R.id.mainlayout);
|
||||
if (_isProcessing) {
|
||||
mainlayout.setVisibility(View.GONE);
|
||||
appbar.setVisibility(View.GONE);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class RomInfo extends AppCompatActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
EdgeToEdge.enable(this);
|
||||
setContentView(R.layout.activity_rom_info);
|
||||
UIUtils.setOnApplyWindowInsetsListener(findViewById(R.id.main));
|
||||
// UIUtils.setOnApplyWindowInsetsListener(findViewById(R.id.main));
|
||||
|
||||
ImageView ivIcon;
|
||||
TextView textName;
|
||||
|
|
@ -47,6 +47,7 @@ public class RomInfo extends AppCompatActivity {
|
|||
Button btn_download;
|
||||
Button btn_pick;
|
||||
TextView descTxt;
|
||||
Toolbar toolbar;
|
||||
|
||||
ivIcon = findViewById(R.id.ivIcon);
|
||||
textName = findViewById(R.id.textName);
|
||||
|
|
@ -54,6 +55,12 @@ public class RomInfo extends AppCompatActivity {
|
|||
btn_download = findViewById(R.id.btn_download);
|
||||
btn_pick = findViewById(R.id.btn_pick);
|
||||
descTxt = findViewById(R.id.descTxt);
|
||||
toolbar = findViewById(R.id.toolbar);
|
||||
|
||||
setSupportActionBar(toolbar);
|
||||
toolbar.setNavigationOnClickListener(v -> {
|
||||
onBackPressed();
|
||||
});
|
||||
|
||||
btn_download.setOnClickListener(v -> {
|
||||
Intent openurl = new Intent();
|
||||
|
|
@ -85,7 +92,7 @@ public class RomInfo extends AppCompatActivity {
|
|||
}
|
||||
|
||||
if (getIntent().hasExtra("icon")) {
|
||||
Glide.with(this).load(getIntent().getStringExtra("icon")).into(ivIcon);
|
||||
Glide.with(this).load(getIntent().getStringExtra("icon")).placeholder(R.drawable.ic_computer_180dp_with_padding).error(R.drawable.ic_computer_180dp_with_padding).into(ivIcon);
|
||||
}
|
||||
|
||||
// btn_pick.setText(getString(R.string.select) + " " + getIntent().getStringExtra("filename"));
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import android.widget.RadioButton;
|
|||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
|
@ -79,38 +80,38 @@ public class AdapterRoms extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
|||
// Get current position of item in recyclerview to bind data and assign values from list
|
||||
final MyHolder myHolder = (MyHolder) holder;
|
||||
final DataRoms current = data.get(position);
|
||||
Glide.with(RomsManagerActivity.activity).load(current.itemIcon).placeholder(R.drawable.no_machine_image).error(R.drawable.no_machine_image).into(myHolder.ivIcon);
|
||||
Glide.with(RomsManagerActivity.activity).load(current.itemIcon).placeholder(R.drawable.ic_computer_180dp_with_padding).error(R.drawable.ic_computer_180dp_with_padding).into(myHolder.ivIcon);
|
||||
myHolder.textName.setText(current.itemName);
|
||||
myHolder.textSize.setText(current.itemSize);
|
||||
myHolder.textSize.setText(current.itemArch + " - " + current.itemSize);
|
||||
//myHolder.checkBox.setChecked(position == mSelectedItem);
|
||||
if (current.itemAvail) {
|
||||
if (FileUtils.fileValid(RomsManagerActivity.activity, AppConfig.maindirpath + current.itemPath)) {
|
||||
//myHolder.checkBox.setEnabled(false);
|
||||
myHolder.textAvail.setTextColor(Color.BLUE);
|
||||
myHolder.textAvail.setText(RomsManagerActivity.sInstalled);
|
||||
} else {
|
||||
//myHolder.checkBox.setEnabled(true);
|
||||
myHolder.textAvail.setTextColor(Color.GREEN);
|
||||
myHolder.textAvail.setText(RomsManagerActivity.sAvailable);
|
||||
}
|
||||
// if (FileUtils.fileValid(RomsManagerActivity.activity, AppConfig.maindirpath + current.itemPath)) {
|
||||
// //myHolder.checkBox.setEnabled(false);
|
||||
// myHolder.textAvail.setTextColor(Color.BLUE);
|
||||
// myHolder.textAvail.setText(RomsManagerActivity.sInstalled);
|
||||
// } else {
|
||||
// //myHolder.checkBox.setEnabled(true);
|
||||
// myHolder.textAvail.setTextColor(Color.GREEN);
|
||||
// myHolder.textAvail.setText(RomsManagerActivity.sAvailable);
|
||||
// }
|
||||
myHolder.linearItem.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mSelectedItem = position;
|
||||
notifyItemRangeChanged(0, data.size());
|
||||
RomsManagerActivity.selected = true;
|
||||
RomsManagerActivity.selectedPath = current.itemPath;
|
||||
RomsManagerActivity.selectedFinalRomFileName = current.itemFinalRomFileName;
|
||||
RomsManagerActivity.selectedExtra = current.itemExtra;
|
||||
RomsManagerActivity.selectedName = current.itemName;
|
||||
RomsManagerActivity.selectedLink = current.itemUrl;
|
||||
RomsManagerActivity.selectedIcon = current.itemIcon;
|
||||
RomsManagerActivity.selectedArch = current.itemArch;
|
||||
// RomsManagerActivity.selected = true;
|
||||
// RomsManagerActivity.selectedPath = current.itemPath;
|
||||
// RomsManagerActivity.selectedFinalRomFileName = current.itemFinalRomFileName;
|
||||
// RomsManagerActivity.selectedExtra = current.itemExtra;
|
||||
// RomsManagerActivity.selectedName = current.itemName;
|
||||
// RomsManagerActivity.selectedLink = current.itemUrl;
|
||||
// RomsManagerActivity.selectedIcon = current.itemIcon;
|
||||
// RomsManagerActivity.selectedArch = current.itemArch;
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(RomsManagerActivity.activity, RomInfo.class);
|
||||
intent.putExtra("title", current.itemName);
|
||||
intent.putExtra("shortdesc", current.itemSize);
|
||||
intent.putExtra("shortdesc", current.itemArch + " - " + current.itemSize);
|
||||
intent.putExtra("getrom", current.itemUrl);
|
||||
intent.putExtra("desc", current.itemDesc);
|
||||
intent.putExtra("icon", current.itemIcon);
|
||||
|
|
@ -151,6 +152,13 @@ public class AdapterRoms extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
|||
//myHolder.checkBox.setEnabled(false);
|
||||
}
|
||||
|
||||
if (position == 0) {
|
||||
myHolder.linearItem.setBackground(AppCompatResources.getDrawable(RomsManagerActivity.activity, R.drawable.object_shape_top));
|
||||
} else if (position == data.size() - 1) {
|
||||
myHolder.linearItem.setBackground(AppCompatResources.getDrawable(RomsManagerActivity.activity, R.drawable.object_shape_bottom));
|
||||
} else {
|
||||
myHolder.linearItem.setBackground(AppCompatResources.getDrawable(RomsManagerActivity.activity, R.drawable.object_shape_middle));
|
||||
}
|
||||
}
|
||||
|
||||
// return total item from List
|
||||
|
|
|
|||
|
|
@ -205,11 +205,11 @@ public class RomsManagerActivity extends AppCompatActivity {
|
|||
//UIUtils.UIAlert(activity, "for first time you need internet connection to load app data!", "No internet connection!");
|
||||
UIUtils.edgeToEdge(this);
|
||||
setContentView(R.layout.activity_roms_manager);
|
||||
UIUtils.setOnApplyWindowInsetsListener(findViewById(R.id.main));
|
||||
// UIUtils.setOnApplyWindowInsetsListener(findViewById(R.id.main));
|
||||
linearload = findViewById(R.id.linearload);
|
||||
linearnothinghere = findViewById(R.id.linearnothinghere);
|
||||
buttontryagain = findViewById(R.id.buttontryagain);
|
||||
loadingPb = findViewById(R.id.loadingPb);
|
||||
// loadingPb = findViewById(R.id.loadingPb);
|
||||
filterToggle = findViewById(R.id.filterToggle);
|
||||
windowsToggle = findViewById(R.id.windowsToggle);
|
||||
linuxToggle = findViewById(R.id.linuxToggle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue