Transparent dialog in android - android

I am using some checkboxes and it is displayed on a dialogbox(dynamically).The next thing i need to make that dialog box transparent.I tried many methods,but failed(wasted the entire day behind this).Can anyone please give me a solution
NB:Currently i am getting a white colour inside the dialog box(Not transparent)
Below is the code.....
Transparent_alert.java
public class Transparent_alert extends Activity{
String tag="Transparent_alert class";
static final String KEY_USERID = "userid";
String errormsg = "", user_id;
SessionManager session;
int k=0;
Intrested_in_adapter m_adapter;
private Builder mDialog;
private Dialog alertDialog;
List<Requestencapsulation> offferList;
List<Offeringencapsulation> offerlist;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
HashMap<String, String> user = session.getUserDetails();
user_id = user.get(SessionManager.KEY_ID);
setContentView(R.layout.requests);
new Serviceclass1().execute();
}
class Serviceclass1 extends
AsyncTask<Void, Void, String> {
#Override
protected String doInBackground(Void... params) {
// TODO Auto-generated method stub
try {
UserFunctions usf = new UserFunctions();
Log.e(tag,"user_id"+user_id);
JSONObject json2 = usf.intrestlist(user_id);
JSONArray contacts = json2
.getJSONArray("interested_list");
for (int j = 0; j < contacts.length(); j++) {
Log.e(tag, "intrestedin forloop");
JSONObject c = contacts
.getJSONObject(j);
Requestencapsulation bean = new Requestencapsulation();
bean.setIntrest_id(c
.getString("interested_id"));
bean.setIntrest_name(c
.getString("interested_name"));
bean.setKey_status(c
.getString("status"));
if (c.getString("interested_info")
.equals("null"))
{
bean.setInterested_info("");
} else {
bean.setInterested_info(c
.getString("interested_info"));
}
offferList.add(bean);
}
k=offferList.size();
}
catch (Exception e) {
e.printStackTrace();
}
return null;
}
protected void onPostExecute(String result) {
new Serviceclass2().execute();
}
}
class Serviceclass2 extends
AsyncTask<Void, Void, String> {
#Override
protected String doInBackground(Void... params) {
// TODO Auto-generated method stub
try {
UserFunctions usf1 = new UserFunctions();
JSONObject json3= usf1.offerlistlist(user_id);
JSONArray contacts1 = json3.getJSONArray("offer_list");
for (int i = 0; i < contacts1.length(); i++) {
Log.e(tag,"INSIDE OFFERING LOOP");
JSONObject d= contacts1.getJSONObject(i);
Log.e(tag,"CREATED JSON OBJECT");
Requestencapsulation bean=new Requestencapsulation();
Log.e(tag,"OBJECT CREATED FOR OFFERINGENCAPSULATION");
bean.setIntrest_id(d
.getString("offer_id"));
Log.e(tag,
"offerid is::"
+ d.getString("offer_id"));
bean.setIntrest_name(d
.getString("offer_name"));
Log.e(tag,
"offer name is::"
+ d.getString("offer_name"));
bean.setKey_status(d.getString("status"));
Log.e(tag,
"status is"
+ d.getString("status"));
// if (d.getString("offer_info").equals(
// "null")) {
// bean.setInterested_info(d
// .getString("interested_info"));
// } else {
// bean.setInterested_info(d
// .getString("interested_info"));
//
// }
offferList.add(bean);
Log.e(tag,"process for bean1 completed");
;
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
protected void onPostExecute(String result) {
new Serviceclass2().execute();
Context c = getParent();
m_adapter = new Intrested_in_adapter(
Transparent_alert.this,
R.layout.intrestedin, offferList);
mDialog = new AlertDialog.Builder(c);
mDialog.setTitle("Intrested In");
mDialog.setAdapter(m_adapter,
new DialogInterface.OnClickListener() {
public void onClick(
DialogInterface dialog,
int item) {
}
});
alertDialog = mDialog.create();
alertDialog.show();
}
}
intrestedin.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<CheckBox
android:id="#+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
/>
</LinearLayout>
Intrested_in_adapter.java
public class Intrested_in_adapter extends ArrayAdapter<Requestencapsulation>{
CheckBox checkbox;
CheckBox checkbox1;
private List<Requestencapsulation> alist;
private List<Offeringencapsulation> alist1;
public Intrested_in_adapter(Context context, int textViewResourceId) {
super(context, textViewResourceId);
}
public Intrested_in_adapter(Context context, int resource, List<Requestencapsulation> items) {
super(context, resource,items);
this.alist=items;
Log.e("Inside Constructor","list size is:"+alist.size());
}
#Override
public Requestencapsulation getItem(int position) {
return alist.get(position);
}
public long getId(int position)
{
return position;
}
#Override
public View getView(int position, View convertView, ViewGroup parent) {
// ViewHolder mHolder;
Requestencapsulation p = getItem(position);
if (convertView == null) {
Log.e("inside convertview","inside convertview");
convertView = LayoutInflater.from(getContext()).inflate(R.layout.intrestedin, parent, false);
}
if (p != null) {
// mHolder = new ViewHolder();
checkbox=(CheckBox)convertView.findViewById(R.id.checkbox);
if(alist.get(position).getKey_status().equalsIgnoreCase("true"))
{
checkbox.setSelected(true);
}else{
checkbox.setSelected(false);
}
checkbox.setText(alist.get(position).getIntrest_name());
}
return convertView;
}
}
maifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gatekeeper.dropswitch"
android:installLocation="auto"
android:largeHeap="true"
android:versionCode="3"
android:versionName="1.1" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.example.gate.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.gate.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:allowBackup="true"
android:icon="#drawable/gate_logo"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.gate.Redirectclass"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:theme="#android:style/Theme.NoTitleBar"
android:name="com.example.gate.Userpage"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guardpage"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Transparent_alert"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="com.example.gate.Registerpage"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.ProfileActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Selectbuttonfromrequestclass"
android:screenOrientation="portrait">
</activity>
<activity
android:name="com.example.gate.Actionclass"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.TabGroup1Activity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Tabgroup2"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Tabgroup3"
android:screenOrientation="portrait" >
</activity>
<activity android:name="com.example.gate.MainActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name="com.example.gate.Home"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Homenext"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Family"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.FamilyMain"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Familyedit"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.GuestMain"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guest"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guestedit"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Services"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Addprovider"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Addservices"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Offering"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name="com.example.gate.Interest"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Accesspreferences"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.ActionActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Messageclass"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Report"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Requestclass"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Notify"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Rsidenceinfo"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Latestservice"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guardactiongroup"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guardprofilegroup"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guardinfogroup"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Otherresidence"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Directoryguardedit"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guardaction"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.skype.raider.Main"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize" >
<intent-filter android:priority="0" >
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel" />
</intent-filter>
</activity>
<activity
android:name="com.example.gate.Guardinfo"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guardprofile"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.video"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guard_message_class"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guard_report_class"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guard_notify_class"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.Guard_request_class"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.gate.guard_addnew_residence"
android:screenOrientation="portrait" >
</activity>
<receiver
android:name="com.example.gate.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.gate" />
</intent-filter>
</receiver>
<service android:name="com.example.gate.GcmIntentService" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
</manifest>
I am not getting any clue to do this .Please anybody help.Any help will be highly appreciated....

try making your dialog transparent, like this
intrestedin.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#android:color/transparent"

if you wanna make your alertdialog transparent i don't know if it's possible but customizing an alertdialog like the code as displayed below is more suitable for this you just need to create an xml file which makes a design exactly similar to your current alert box and can make it as transparent.
dialog = new Dialog(context);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.dialog_profile_report);
dialog.setCanceledOnTouchOutside(false);
dialog.getWindow().setBackgroundDrawable(
new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.show();
Button mainListView = (Button) dialog.findViewById(R.id.listview); // you can declare elements like this and can make onclick methods for these elements

Replace
alertDialog = mDialog.create();
alertDialog.show();
with
alertDialog = mDialog.create();
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
alertDialog.show();
Issue:
Your adapter is inflating row layout to display in ListView. and as you can see, it is going to reference with Parent container while inflating using LayoutInflater.
It is creating problem while making everything transparent.
Option 1 :
You should consider using Dialog instead of AlertDialog and should set your desired layout by using setContentView
Option 2 :
You will have some drawback because of old api but it will work in new apis
replace
mDialog = new AlertDialog.Builder(c);
with
mDialog = (Integer.parseInt(android.os.Build.VERSION.SDK) < 11)? new AlertDialog.Builder(c) :new AlertDialog.Builder(c, android.R.style.Theme_Translucent);

please put below code in style
<style name="CustomAlert" parent="android:Theme.Dialog">
<item name="android:windowBackground">#android:color/transparent</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">#null</item>
<item name="android:windowAnimationStyle">#android:style/Animation.Dialog</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:background">#android:color/transparent</item>
</style>
Code:
Dialog mDialog = new Dialog(baseApplication.getCurrentActivity(),
R.style.CustomAlert);
mDialog.setCancelable(true);
mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mDialog.setContentView(R.layout.inflate_toast);
//you can set height width of dialog as well as position
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
Window window = mDialog.getWindow();
lp.copyFrom(window.getAttributes());
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
lp.gravity = Gravity.TOP;
window.setAttributes(lp);
mDialog.show();
In your activity xml:
set background as transparent color to listview, listview's divider,and inflated layout of listview.

Related

android.content.ActivityNotFoundException: Unable to find explicit activity class

public class ListViewActivity extends AppCompatActivity
{
ListView lv;
String[] ListItems={"AutoCompleteTextViewActivity","CheckboxActivity","EditTextActivity","ListViewActivity","ProgressBarActivity","RadioButtonActivity","RatingBar2Activity","RatngBarActivity","SeekBarActivity","SpinnerActivity","SwitchActivity","TextViewActivity"};
#Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_view);
lv=(ListView)findViewById(R.id.listView1);
ArrayAdapter ad=new ArrayAdapter(ListViewActivity.this,android.R.layout.simple_list_item_1,ListItems);
lv.setAdapter(ad);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener()
{
#Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
Intent i = new Intent(ListViewActivity.this, ListItems[position].getClass());
startActivity(i);
}
});
}
}
i am current learning android studio.i made an app through which i can open my previously created apps by choosing them from a listview widget.it shows an error in the intent line.please tell me where i've have gone wrong.
MY MANIFEST FILE
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.user.re1">
<application
android:allowBackup="true"
android:banner="#mipmap/ic_launcher_round"
android:icon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".TextViewActivity" />
<activity android:name=".EditTextActivity" />
<activity android:name=".RadioButtonActivity" />
<activity android:name=".CheckboxActivity" />
<activity android:name=".RatngBarActivity" />
<activity android:name=".RatingBar2Activity" />
<activity android:name=".ProgressBarActivity" />
<activity android:name=".SeekBarActivity" />
<activity android:name=".SwitchActivity" />
<activity android:name=".SpinnerActivity"/>
<activity android:name=".AutoCompleteTextViewActivity">
</activity>
<activity android:name=".ListViewActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Add your activity name to your manifest file
<activity android:name=".ListViewActivity"></activity>

How to save data from EditTexts in RecyclerView during screen rotation

I read that EditText doesn't work well with RecyclerView, but I saw an application where it works well (avito). Now I am trying to understand how it was realized there.
I have a fragment with RecyclerView, in recycler view I have EditTexts only in header holder (only one item with EditTexts). In this header I have about five similar EditTexts and TextViews (city,title,description,price etc.) So as not to duplicate the code for all views, I made a custom view class where I located these views, and this class I show below.
public class CustomEditTextView extends LinearLayout implements TextWatcher {
private LayoutInflater inflater;
private TextView textView;
private final EditText editText;
private TextView tvWarning;
private View view;
private String hint;
private String text ;
private String title;
private String warning;
private boolean isNumber = false;
private SpinnerCitySetupListener spinnerCitySetupListener;
public CustomEditTextView(Context context, AttributeSet attrs) {
super(context, attrs);
inflater = LayoutInflater.from(context);
view = inflater.inflate(R.layout.custom_edittext, this, true);
textView = (TextView) view.findViewById(R.id.mycustom_tvTitle);
editText = (EditText) view.findViewById(R.id.mycustom_etTitle);
tvWarning = (TextView) view.findViewById(R.id.mycustom_tvWarning);
textView.setVisibility(GONE);
tvWarning.setVisibility(GONE);
}
public void setCustomVisibility(View view,boolean isVisible){
view.setVisibility(isVisible?VISIBLE:GONE);
}
public void tuningView() {
editText.addTextChangedListener(this);
if(isNumber)editText.setInputType(InputType.TYPE_CLASS_NUMBER);
}
public void setTitle(String title){
textView.setText(title);
this.title = title;
}
public void setHint(String hint){
editText.setHint(hint);
this.hint = hint;
}
public void setWarning(String warning){
tvWarning.setText(warning);
this.warning = warning;
}
public void setText(String text) {
editText.setText(text);
}
public String getText(){
Log.i("CUSTOM VIEW","GET TEXT FROM VIEW: "+ text);
return text;
}
public TextView getTvWarning(){
return tvWarning;
}
public void setInputType(boolean isNumber){
this.isNumber = isNumber;
}
public void setSpinnerCityListener(SpinnerCitySetupListener listener){
spinnerCitySetupListener = listener;
}
//region TextChangedListener
#Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
#Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
text = charSequence.toString();
}
#Override
public void afterTextChanged(Editable editable) {
if (editable.toString().length()!= 0) {
setCustomVisibility(textView,true);
text = editable.toString();
if(spinnerCitySetupListener!= null) spinnerCitySetupListener.spinnerActivation(false);}
else {setCustomVisibility(textView,false);
if(spinnerCitySetupListener!= null) spinnerCitySetupListener.spinnerActivation(true);}
}
//endregion
}
my manifest:`
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.CALL_PHONE"/>
<!-- <uses-permission android:name="android.permission.SEND_SMS"/>-->
<permission
android:name="com.android.qrz.gcm.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.android.qrz.gcm.permission.C2D_MESSAGE" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:name="android.support.multidex.MultiDexApplication"
android:allowBackup="true"
android:icon="#drawable/qrz_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<!--android:name=".QRZApp"-->
<meta-data
android:name="AA_DB_NAME"
android:value="QRZ.db" />
<meta-data
android:name="AA_DB_VERSION"
android:value="1" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBlOgCglvJdnPS476oiF4MRAo3pV3nQ8w8"/>
<receiver
android:name=".receiver.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.android.qrz.receiver" />
</intent-filter>
</receiver>
<receiver
android:name=".receiver.InternetCheckReceiver"
android:label="NetworkConnection" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<service
android:name=".services.GCMIntentService"
android:process=":remote" />
<activity
android:name=".activity.SplashScreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--<activity-->
<!--android:name=".activity.main_menu.MainMenu"-->
<!--android:label="#string/title_activity_menu" >-->
<!--</activity>-->
<activity
android:name=".activity.main_menu.NewMainMenu"
android:label="#string/title_activity_menu" >
</activity>
<activity
android:name=".activity.LoginActivity"
android:label="#string/title_activity_login" >
</activity>
<!--<activity-->
<!--android:name=".activity.Registration"-->
<!--android:label="#string/title_activity_registration" >-->
<!--</activity>-->
<activity
android:name=".activity.registration.NewRegistration"
android:label="#string/title_activity_registration" >
</activity>
<activity
android:name=".activity.News"
android:label="#string/title_activity_news" >
</activity>
<activity
android:name=".activity.news.DetailNewsActivity"
android:label="#string/title_activity_news" >
</activity>
<!--<activity-->
<!--android:name=".activity.Callbook"-->
<!--android:label="#string/title_activity_callbook" >-->
<!--</activity>-->
<activity
android:name=".activity.NewCallbook"
android:label="Callbook" >
</activity>
<activity
android:name=".activity.PhotoGallery"
android:label="#string/title_activity_photo_gallery" >
</activity>
<!--<activity
android:name=".activity.DiplomsActivity"
android:label="#string/title_activity_diploms" >
</activity>-->
<activity
android:name=".activity.new_diploms.ui.MainDiplomActivity"
android:label="#string/title_activity_new_diploms" >
</activity>
<activity
android:name=".activity.new_diploms.ui.detail_diplom.DiplomDetailActivity"
android:label="#string/title_activity_new_detail_diploms" >
</activity>
<activity
android:name=".activity.new_diploms.ui.searching.SearchingActivity"
android:label="#string/title_activity_searching_diploms" >
</activity>
<activity
android:name=".activity.BirthdaysActivity"
android:label="#string/title_activity_birthdays" >
</activity>
<activity
android:name=".activity.competitions.CompetitionsActivity"
android:label="#string/title_activity_competitions" >
</activity>
<activity
android:name=".activity.DXActivity"
android:label="#string/title_activity_DX" >
</activity>
<activity
android:name=".activity.DXDetailActivity"
android:label="#string/title_activity_DX_detail" >
</activity>
<activity
android:name=".activity.base_of_frequency.BaseFrequencyActivity"
android:label="#string/title_activity_frequency" >
</activity>
<activity
android:name=".activity.qsl.QslActivity"
android:label="#string/title_activity_qsl" >
</activity>
<activity
android:name=".activity.qsl.QSLSearching"
android:label="#string/title_activity_qsl_searching" >
</activity>
<activity
android:name=".activity.declarations.BillboardActivity"
android:label="#string/title_activity_billboard" >
</activity>
<activity
android:name=".activity.declarations.SearchingFilterActivity"
android:label="#string/title_activity_filters_for_search"
>
</activity>
<activity
android:name=".activity.declarations.NewSearchingDeclarationActivity"
android:label="#string/title_activity_searching_declaration" >
</activity>
<activity
android:name=".activity.declarations.ListDeclarationsActivity"
android:label="#string/title_activity_list_declarations" >
</activity>
<activity
android:name=".activity.declarations.DeclarationDetailActivity"
android:label="#string/title_activity_declaration_detail" >
</activity>
<activity
android:name=".activity.personal_activity.PersonalActivity"
android:label="#string/title_activity_personal" >
<intent-filter>
<action android:name="android.intent.action.PICK"></action>
</intent-filter>
</activity>
<activity
android:name=".activity.personal_activity.create_declaration.CreateDeclarationActivity"
android:label="#string/title_activity_create_declaration" >
</activity>
<activity
android:name=".activity.personal_activity.create_qsl_manager.CreateQSLManagerActivity"
android:label="#string/title_activity_create_qsl" >
</activity>
<activity
android:name=".activity.personal_activity.create_dx_reporter.CreateDXReporterActivity"
android:label="#string/title_activity_create_dx_reporter" >
</activity>
<activity
android:name=".activity.personal_activity.create_frequency.CreateFrequencyActivity"
android:label="#string/title_activity_create_frequency" >
</activity>
<activity
android:name=".activity.personal_activity.settings.PersonalSettingsActivity"
android:label="#string/title_activity_settings" >
</activity>
<activity
android:name=".activity.ForumActivity"
android:label="#string/title_activity_forum" >
</activity>
<activity
android:name=".activity.AboutAppActivity"
android:label="#string/title_activity_about_app" >
</activity>
<service
android:name=".rest_service.rest.RestService"
android:enabled="true"
android:exported="true" >
</service><!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
`
My problem is variable "text" in afterTextChanged or in onTextChanged "text" is not empty, in this part of code all works well, but when I want to get this text from my headerHolder I calling customView.getText() for sending this data in fragment for OnSavedInstance and this variable "text" become null, but EditText contains text all this time, why does this happen?

Failed to send sms in Android Studio

New to android and I can't seem to be able to send any text to myself on my emulator. I have allowed permission in the manifest file and imported the necessary classes but still can't seem to figure out what's wrong. Any help would be greatly appreciated.
public class Detail extends AppCompatActivity {
public Button button5;
Spinner spinner2;
ArrayAdapter<CharSequence> adapter;
EditText editText4;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
editText4 = (EditText) this.findViewById(R.id.editText4);
button5 = (Button) findViewById(R.id.button5);
button5.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
String contact = editText4.getText().toString();
String message = "Help is on the way.";
sendMessage(contact,message);
Intent b = new Intent(Detail.this, End.class);
startActivity(b);
}
});
spinner2 = (Spinner) findViewById(R.id.spinner2);
adapter = ArrayAdapter.createFromResource(this,R.array.selectissue,android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner2.setAdapter(adapter);
spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
#Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(getBaseContext(),parent.getItemAtPosition(position) + " selected" , Toast.LENGTH_LONG).show();
}
#Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
private void sendMessage(String contact, String message)
{
SmsManager smsManager = SmsManager.getDefault();
try {
smsManager.sendTextMessage(contact, null , message , null , null);
Toast.makeText(getApplicationContext(), "SMS Sent.", Toast.LENGTH_LONG).show();
} catch (Exception e)
{
Toast.makeText(getApplicationContext(), "SMS failed to send.", Toast.LENGTH_LONG).show();
}
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_detail, menu);
return true;
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
Manifest
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SEND_SMS"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Login"
android:label="#string/title_activity_login" >
</activity>
<activity
android:name=".Option"
android:label="#string/title_activity_option" >
</activity>
<activity
android:name=".Detail"
android:label="#string/title_activity_detail" >
</activity>
<activity
android:name=".End"
android:label="#string/title_activity_end" >
</activity>
<activity
android:name=".Feedback"
android:label="#string/title_activity_feedback" >
</activity>
<activity
android:name=".Student"
android:label="#string/title_activity_student" >
</activity>
<activity
android:name=".Incident"
android:label="#string/title_activity_incident" >
</activity>
<activity
android:name=".Help"
android:label="#string/title_activity_help" >
</activity>
<activity
android:name=".Wifi"
android:label="#string/title_activity_wifi" >
</activity>
<activity
android:name=".Basic"
android:label="#string/title_activity_basic" >
</activity>
<activity
android:name=".Home"
android:label="#string/title_activity_home" >
</activity>
<activity
android:name=".Guide"
android:label="#string/title_activity_guide" >
</activity>
<activity
android:name=".VPN"
android:label="#string/title_activity_vpn" >
</activity>
<activity
android:name=".VDI"
android:label="#string/title_activity_vdi" >
</activity>
<activity
android:name=".Location"
android:label="#string/title_activity_location" >
</activity>
<activity
android:name=".Phone"
android:label="#string/title_activity_phone" >
</activity>
<activity
android:name=".config"
android:label="#string/title_activity_config" >
</activity>
<activity
android:name=".Script"
android:label="#string/title_activity_script" >
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" />
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider"
android:exported="true" />
<activity
android:name=".Register"
android:label="#string/title_activity_register" >
</activity>
<activity
android:name=".Signup"
android:label="#string/title_activity_signup" >
</activity>
</application>
You can not send text messages via emulator if you want to test SMS feature then test it on real android device with activated sim card.

ListActivity not working

I'm creating a menu where all of my activity will be on the list, and whenever i clicked an activity from that list, it should start that activity.
here is my menu.java
public class Menu extends ListActivity
{
String classnames[] = {"MainActivity","example1","example2","example3",
"example4","example5","example6","example7","example8","example9","example10"};
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<String>(Menu.this,android.R.layout.simple_list_item_1,classnames));
}
protected void onListItemClick(ListView l, View v, int position, long id)
{
super.onListItemClick(l, v, position, id);
String classClicked = classnames[position];
try
{
Class ourclass = Class.forName("android.intent.action."+classClicked);
Intent intent = new Intent(Menu.this,ourclass);
startActivity(intent);
}
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
}
}
here is my manifest:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Menu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
It don't have any error but my MainActivity doesn't start even when I clicked it.
Here's what it looks like:
Use getListView().setOnItemClickListener instead of onListItemClick. Why? to be honest i also dont know, but it solved my problem.
You must declare all your activities in AndroidManifest.xml otherwise it won't work. Your updated manifest file should look like this:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Menu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".example1"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example2"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example3"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example4"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example5"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example6"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example7"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example8"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example9"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".example10"
android:label="#string/app_name"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
</application>
Menu.java
public class Menu extends ListActivity
{
String classnames[] = {"MainActivity","example1","example2","example3",
"example4","example5","example6","example7","example8","example9","example10"};
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<String>(Menu.this,android.R.layout.simple_list_item_1,classnames));
getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
#Override
public void onItemClick(AdapterView<?> adapterView, View view, final int position, long l) {
String classClicked = classnames[position];
try {
Class ourclass = Class.forName("android.intent.action."+classClicked);
Intent intent = new Intent(getApplicationContext(),ourclass);
startActivity(intent);
}
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
}
});
}
protected void onListItemClick(ListView l, View v, int position, long id)
{
/*super.onListItemClick(l, v, position, id);
String classClicked = classnames[position];
try
{
Class ourclass = Class.forName("android.intent.action."+classClicked);
Intent intent = new Intent(Menu.this,ourclass);
startActivity(intent);
}
catch(ClassNotFoundException e)
{
e.printStackTrace();
}*/
}
}
And now everything should work.
You must register the other activities in your manifest, just like the mainactivity. Otherwise Android wont start them.

((ChuckApplication) getActivity().getApplication()).setCurrentGame(c) in Fragment

I'm currently studying a trivia style app and I'm using it in a Fragment. If I use Activities instead of Fragments, the code works:
((ChuckApplication)getApplication()).setCurrentGame(c);
But once I cast it for an activity it keeps on getting an error. The code is:
((ChuckApplication)getActivity().getApplication()).setCurrentGame(c);
The whole code is for this fragment is:
public class Activity_Home_Language extends Fragment implements OnClickListener{
Intent intent;
ImageButton btnToggle;
Button btnExam,btnReview;
TextView txtTitle;
View rootView;
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.layout_home_language, container, false);
btnToggle = (ImageButton) rootView.findViewById(R.id.btnToggle);
btnExam = (Button) rootView.findViewById(R.id.btnExam);
btnReview = (Button) rootView.findViewById(R.id.btnReview);
txtTitle = (TextView) rootView.findViewById(R.id.txtTitle);
btnToggle.setOnClickListener(this);
btnExam.setOnClickListener(this);
btnReview.setOnClickListener(this);
//FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
//transaction.add(R.id.frameContent, new Activity_Home());
//transaction.add(R.id.framePager2, new ViewPagerMunicipalities());
//transaction.add(R.id.frameDestPager, new ViewPagerDes());
//transaction.commit();
//for fading animation
return rootView;
}
#Override
public void onClick(View v) {
if(v==btnToggle){
Activity_Main.mSlideHolder.open();
}
else if(v==btnExam){
FragmentTransaction transaction = getFragmentManager().beginTransaction();
//transaction.addToBackStack(null);
transaction.replace(R.id.frameContent, new Activity_Question_Exam_Home()).commit();
}
else if(v==btnReview){
//enable this to move to move to a Activity or fragment activity
//intent = new Intent(rootView.getContext(), Activity_About.class);
//startActivityForResult(intent,0);
//Get Question set //
List<Question> questions = getQuestionSetFromDb();
//Initialise Game with retrieved question set ///
GamePlay c = new GamePlay();
c.setQuestions(questions);
c.setNumRounds(getNumQuestions());
((ChuckApplication) getActivity().getApplication()).setCurrentGame(c);
FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.replace(R.id.frameContent, new Activity_Home_Language_Review()).commit();
//transaction.addToBackStack(null);
//transaction.commit();
//FragmentTransaction transaction = getFragmentManager().beginTransaction();
//transaction.addToBackStack(null);
//transaction.replace(R.id.frameContent, new Activity_Question_Review_Home()).commit();
}
else {
}
}
/**
* Method that retrieves a random set of questions from
* the database for the given difficulty
* #return
* #throws Error
*/
private List<Question> getQuestionSetFromDb() throws Error {
int diff = getDifficultySettings();
int numQuestions = getNumQuestions();
DBHelper myDbHelper = new DBHelper(getActivity());
try {
myDbHelper.createDataBase();
} catch (IOException ioe) {
throw new Error("Unable to create database");
}
try {
myDbHelper.openDataBase();
}catch(SQLException sqle){
throw sqle;
}
List<Question> questions = myDbHelper.getQuestionSet(diff, numQuestions);
//List<Question> questions = myDbHelper.getQuestionSet(diff, 2);
myDbHelper.close();
return questions;
}
/**
* Method to return the difficulty settings
* #return
*/
private int getDifficultySettings() {
SharedPreferences settings = getActivity().getSharedPreferences(Constants.SETTINGS, 0);
int diff = settings.getInt(Constants.DIFFICULTY, Constants.MEDIUM);
return diff;
}
/**
* Method to return the number of questions for the game
* #return
*/
private int getNumQuestions() {
SharedPreferences settings = getActivity().getSharedPreferences(Constants.SETTINGS, 0);
int numRounds = settings.getInt(Constants.NUM_ROUNDS, 20);
return numRounds;
}
#Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
}
}
Please help. I'm stuck at that line.
Here's the application:
package com.example.civilserviceexamreviewer;
import android.app.Application;
import com.example.civilserviceexamreviewer.quiz.GamePlay;
public class ChuckApplication extends Application{
private GamePlay currentGame;
/**
* #param currentGame the currentGame to set
*/
public void setCurrentGame(GamePlay currentGame) {
this.currentGame = currentGame;
}
/**
* #return the currentGame
*/
public GamePlay getCurrentGame() {
return currentGame;
}
}
Here's the manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.civilserviceexamreviewer"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" >
<activity
android:name="com.example.civilserviceexamreviewer.Activity_Splash1"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.civilserviceexamreviewer.Activity_Splash2"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Activity_Main"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.civilserviceexamreviewer.Activity_Question_Review_Home"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.civilserviceexamreviewer.Activity_About"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.civilserviceexamreviewer.Activity_Choices"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<application
android:allowBackup="true"
android:name="com.example.civilserviceexamreviewer.ChuckApplication"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name">
</application>
</manifest>
The way that you're accessing the Application (or its subclass) from within your Fragment is fine and correct. Since the error you're getting is a ClassCastException, I think that your problem is that you haven't declared your custom Application subclass in the AndroidManifest.xml's application tag. For this reason, calling .getApplication() will actually return an object of type android.app.Application which cannot be typecast to your custom Application class. Perhaps you did do this in your original Activity-based project, but forgot to do so when creating the Fragments-based project?
Example of how to declare your Application subclass in the manifest file:
<application
android:name="com.example.civilserviceexamreviewer.ChuckApplication"
android:icon="..."
android:label="...">
</application>
So, the complete manifest you posted in your question should actually be:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name="com.example.civilserviceexamreviewer.ChuckApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" >
<activity
android:name="com.example.civilserviceexamreviewer.Activity_Splash1"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.civilserviceexamreviewer.Activity_Splash2"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Activity_Main"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.civilserviceexamreviewer.Activity_Question_Review_Home"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.civilserviceexamreviewer.Activity_About"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.civilserviceexamreviewer.Activity_Choices"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>

Categories

Resources