Refactored widgets package into the gui.widgets package
This commit is contained in:
parent
c61878a3a5
commit
ec93d39de0
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<es.ugr.swad.swadroid.widget.CheckableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<es.ugr.swad.swadroid.gui.widget.CheckableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/listItem"
|
android:id="@+id/listItem"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -29,4 +29,4 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dip"
|
android:layout_height="1dip"
|
||||||
android:background="@android:color/darker_gray"/>
|
android:background="@android:color/darker_gray"/>
|
||||||
</es.ugr.swad.swadroid.widget.CheckableLinearLayout>
|
</es.ugr.swad.swadroid.gui.widget.CheckableLinearLayout>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<es.ugr.swad.swadroid.widget.CheckableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<es.ugr.swad.swadroid.gui.widget.CheckableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/listItem"
|
android:id="@+id/listItem"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -29,4 +29,4 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dip"
|
android:layout_height="1dip"
|
||||||
android:background="@android:color/darker_gray"/>
|
android:background="@android:color/darker_gray"/>
|
||||||
</es.ugr.swad.swadroid.widget.CheckableLinearLayout>
|
</es.ugr.swad.swadroid.gui.widget.CheckableLinearLayout>
|
|
@ -19,13 +19,13 @@
|
||||||
|
|
||||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<es.ugr.swad.swadroid.widget.NumberPickerButton android:id="@+id/increment"
|
<es.ugr.swad.swadroid.gui.widget.NumberPickerButton android:id="@+id/increment"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/timepicker_up_btn"/>
|
android:background="@drawable/timepicker_up_btn"/>
|
||||||
|
|
||||||
<EditText android:id="@+id/timepicker_input"
|
<EditText android:id="@+id/timepicker_input"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
android:textSize="30sp"
|
android:textSize="30sp"
|
||||||
android:background="@drawable/timepicker_input"/>
|
android:background="@drawable/timepicker_input"/>
|
||||||
|
|
||||||
<es.ugr.swad.swadroid.widget.NumberPickerButton android:id="@+id/decrement"
|
<es.ugr.swad.swadroid.gui.widget.NumberPickerButton android:id="@+id/decrement"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/timepicker_down_btn"/>
|
android:background="@drawable/timepicker_down_btn"/>
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
android:layout_weight="0.1"
|
android:layout_weight="0.1"
|
||||||
android:background="@drawable/back"/>
|
android:background="@drawable/back"/>
|
||||||
|
|
||||||
<es.ugr.swad.swadroid.widget.TextProgressBar
|
<es.ugr.swad.swadroid.gui.widget.TextProgressBar
|
||||||
android:id="@+id/test_questions_bar"
|
android:id="@+id/test_questions_bar"
|
||||||
style="?android:attr/progressBarStyleHorizontal"
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:text="@string/testNumQuestionsMsg"/>
|
android:text="@string/testNumQuestionsMsg"/>
|
||||||
|
|
||||||
<es.ugr.swad.swadroid.widget.NumberPicker
|
<es.ugr.swad.swadroid.gui.widget.NumberPicker
|
||||||
android:id="@+id/testNumQuestionsNumberPicker"
|
android:id="@+id/testNumQuestionsNumberPicker"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -36,13 +36,14 @@ import android.preference.Preference.OnPreferenceChangeListener;
|
||||||
import android.preference.Preference.OnPreferenceClickListener;
|
import android.preference.Preference.OnPreferenceClickListener;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
import com.bugsense.trace.BugSenseHandler;
|
import com.bugsense.trace.BugSenseHandler;
|
||||||
|
|
||||||
|
import es.ugr.swad.swadroid.gui.widget.SeekBarDialogPreference;
|
||||||
import es.ugr.swad.swadroid.model.DataBaseHelper;
|
import es.ugr.swad.swadroid.model.DataBaseHelper;
|
||||||
import es.ugr.swad.swadroid.sync.SyncUtils;
|
import es.ugr.swad.swadroid.sync.SyncUtils;
|
||||||
import es.ugr.swad.swadroid.utils.Crypto;
|
import es.ugr.swad.swadroid.utils.Crypto;
|
||||||
import es.ugr.swad.swadroid.utils.Utils;
|
import es.ugr.swad.swadroid.utils.Utils;
|
||||||
import es.ugr.swad.swadroid.widget.SeekBarDialogPreference;
|
|
||||||
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -7,7 +7,6 @@ import org.apache.commons.io.IOUtils;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package es.ugr.swad.swadroid.widget;
|
package es.ugr.swad.swadroid.gui.widget;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
|
@ -16,7 +16,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package es.ugr.swad.swadroid.widget;
|
package es.ugr.swad.swadroid.gui.widget;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package es.ugr.swad.swadroid.widget;
|
package es.ugr.swad.swadroid.gui.widget;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package es.ugr.swad.swadroid.widget;
|
package es.ugr.swad.swadroid.gui.widget;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
|
@ -16,7 +16,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package es.ugr.swad.swadroid.widget;
|
package es.ugr.swad.swadroid.gui.widget;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
|
@ -17,7 +17,7 @@
|
||||||
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package es.ugr.swad.swadroid.widget;
|
package es.ugr.swad.swadroid.gui.widget;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
|
@ -31,9 +31,9 @@ import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import es.ugr.swad.swadroid.Constants;
|
import es.ugr.swad.swadroid.Constants;
|
||||||
import es.ugr.swad.swadroid.R;
|
import es.ugr.swad.swadroid.R;
|
||||||
|
import es.ugr.swad.swadroid.gui.widget.CheckableLinearLayout;
|
||||||
import es.ugr.swad.swadroid.model.Test;
|
import es.ugr.swad.swadroid.model.Test;
|
||||||
import es.ugr.swad.swadroid.model.TestAnswer;
|
import es.ugr.swad.swadroid.model.TestAnswer;
|
||||||
import es.ugr.swad.swadroid.widget.CheckableLinearLayout;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -32,15 +32,16 @@ import android.widget.AdapterView.OnItemClickListener;
|
||||||
import es.ugr.swad.swadroid.Constants;
|
import es.ugr.swad.swadroid.Constants;
|
||||||
import es.ugr.swad.swadroid.Preferences;
|
import es.ugr.swad.swadroid.Preferences;
|
||||||
import es.ugr.swad.swadroid.R;
|
import es.ugr.swad.swadroid.R;
|
||||||
|
import es.ugr.swad.swadroid.gui.widget.CheckableLinearLayout;
|
||||||
|
import es.ugr.swad.swadroid.gui.widget.NumberPicker;
|
||||||
|
import es.ugr.swad.swadroid.gui.widget.TextProgressBar;
|
||||||
import es.ugr.swad.swadroid.model.Test;
|
import es.ugr.swad.swadroid.model.Test;
|
||||||
import es.ugr.swad.swadroid.model.TestAnswer;
|
import es.ugr.swad.swadroid.model.TestAnswer;
|
||||||
import es.ugr.swad.swadroid.model.TestQuestion;
|
import es.ugr.swad.swadroid.model.TestQuestion;
|
||||||
import es.ugr.swad.swadroid.model.TestTag;
|
import es.ugr.swad.swadroid.model.TestTag;
|
||||||
import es.ugr.swad.swadroid.modules.Module;
|
import es.ugr.swad.swadroid.modules.Module;
|
||||||
import es.ugr.swad.swadroid.utils.Utils;
|
import es.ugr.swad.swadroid.utils.Utils;
|
||||||
import es.ugr.swad.swadroid.widget.CheckableLinearLayout;
|
|
||||||
import es.ugr.swad.swadroid.widget.NumberPicker;
|
|
||||||
import es.ugr.swad.swadroid.widget.TextProgressBar;
|
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -120,6 +121,37 @@ public class TestsMake extends Module {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Screen to select the number of questions in the test
|
* Screen to select the number of questions in the test
|
||||||
|
* REQUIRES API 11 OR HIGHER
|
||||||
|
*/
|
||||||
|
/*private void setNumQuestions() {
|
||||||
|
final android.widget.NumberPicker numberPicker;
|
||||||
|
Button acceptButton;
|
||||||
|
|
||||||
|
setLayout(R.layout.tests_num_questions);
|
||||||
|
|
||||||
|
numberPicker = (android.widget.NumberPicker) findViewById(R.id.testNumQuestionsNumberPicker);
|
||||||
|
numberPicker.setMaxValue(test.getMax());
|
||||||
|
numberPicker.setMinValue(test.getMin());
|
||||||
|
numberPicker.setValue(test.getDef());
|
||||||
|
numberPicker.setWrapSelectorWheel(false);
|
||||||
|
|
||||||
|
acceptButton = (Button) findViewById(R.id.testNumQuestionsAcceptButton);
|
||||||
|
acceptButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
numQuestions = numberPicker.getValue();
|
||||||
|
|
||||||
|
if (isDebuggable) {
|
||||||
|
Log.d(TAG, "numQuestions=" + numQuestions);
|
||||||
|
}
|
||||||
|
|
||||||
|
setTags();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Screen to select the number of questions in the test
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
private void setNumQuestions() {
|
private void setNumQuestions() {
|
||||||
final NumberPicker numberPicker;
|
final NumberPicker numberPicker;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user