mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-14 01:21:35 +01:00
Compare commits
No commits in common. "940aad20d4aa258e4849b5a29895e707bc3bb178" and "51d36dc29752b4d47376b3b832b851acbcb0d18a" have entirely different histories.
940aad20d4
...
51d36dc297
4 changed files with 3 additions and 22 deletions
|
@ -10,10 +10,8 @@ import android.widget.TextView;
|
|||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
|
||||
|
||||
import net.foucry.pilldroid.dao.PrescriptionsDAO;
|
||||
import net.foucry.pilldroid.databases.PrescriptionDatabase;
|
||||
import net.foucry.pilldroid.models.Prescription;
|
||||
|
|
|
@ -42,7 +42,6 @@ import androidx.core.content.ContextCompat;
|
|||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
@ -712,8 +711,6 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
void backupprefs() {
|
||||
Log.i(TAG, "backupprefs");
|
||||
|
||||
final Dialog dlg = new Dialog(this);
|
||||
dlg.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
Objects.requireNonNull(dlg.getWindow()).setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
|
@ -728,15 +725,12 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
btn_export.setEnabled(true);
|
||||
btn_import.setEnabled(false);
|
||||
|
||||
Button ok = dlg.findViewById(R.id.agreed);
|
||||
Button cancel = dlg.findViewById(R.id.notagreed);
|
||||
|
||||
PrescriptionDatabase prescriptions = PrescriptionDatabase.getInstanceDatabase(this);
|
||||
|
||||
|
||||
Button ok = dlg.findViewById(R.id.ok_btn);
|
||||
Button cancel = dlg.findViewById(R.id.cancel_btn);
|
||||
ok.setOnClickListener(v -> {
|
||||
dlg.cancel();
|
||||
//TODO: manage the options
|
||||
Log.i(TAG, "ok button");
|
||||
});
|
||||
|
||||
cancel.setOnClickListener(v -> {
|
||||
|
@ -744,14 +738,5 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
Log.i(TAG, "dismiss dialog");
|
||||
});
|
||||
dlg.show();
|
||||
|
||||
Log.i(TAG, "ok button");
|
||||
if ( btn_export.isEnabled() {
|
||||
// TODO: call `make backup
|
||||
prescriptions.backup();
|
||||
|
||||
} else {
|
||||
// TODO: call restore backup
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
android:layout_height="319dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@color/lightgrey"
|
||||
app:cardCornerRadius="@dimen/btn_radius"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -20,5 +20,4 @@
|
|||
<color name="grey">#777</color>
|
||||
<color name="unselected_background">#777777</color>
|
||||
<color name="selected_background">#4f91ff</color>
|
||||
<color name="lightgrey">#ACABAC</color>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue