|
Member 13341792 wrote: but its not working correctly.. Which means what exactly?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I mean I still can't change the layout when pressing the button.
|
|
|
|
|
What is it doing? Not doing? Are exceptions being thrown? Have you stepped through the code using the debugger?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I have tried to use fragment transaction to try and replace the page layout with that of the new fragment ,However, when I click the button,the app crashes.
|
|
|
|
|
Member 13341792 wrote: ...the app crashes. Exception? Anything in the logcat window?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I am converting a console application that runs under Windows to run under the base Linux O/S of Android phones (version 5.x or later). With the exception of calls to the Windows API DeviceIoControl() (which I've isolated in a single module), the application is written in Standard C++, and converting it to C is a large effort.
I have discovered that Android 6.x and above support C++, but Android 5.x does not.
Is there any way to create a statically-linked application (no reliance on shared libraries) in Android? This would perhaps allow me to compile the code with the Android 6.x tools, but run it under Android 5.x.
Thanks for your help.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
i even just know that android now support C++
|
|
|
|
|
As a console application (to be run via ADB). AFAIK, you still can't write graphical applications in C++.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Hey has anyone done campaign attribution for Android here? Facing issues in all CPC campaigns attribution, it is endlessly reflecting as organic on Google analytics.
|
|
|
|
|
|
... of any sample apps in GO for Android (with UI)?
|
|
|
|
|
|
I am developing app, in which i author add number of questions and marks/question needed for test, that add marks gives the total marks for test. I need that total marks in textview in another activity, but not through intent, is there any possible way. Please let me know
|
|
|
|
|
Put that information in a separate class that both activities have access to (e.g., the Application ).
Why are you against passing such data through the Intent ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
how i add gif emoji in android studio project?
|
|
|
|
|
|
how I add animation in chat application in chat activity in the android studio?
|
|
|
|
|
|
Start here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hi;
I am new to Android, and I am making a book reader (not for all books) but only for one textbook. I started with the demo for multi-pages in Android developers section and I added some text to it. My question is, is that the correct example I used (TextView)? here is my code:
I ma saving the strings in "String.xml" file.
public class MainActivity extends AppCompatActivity {
private SectionsPagerAdapter mSectionsPagerAdapter;
private ViewPager mViewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
PlaceholderFragment p = PlaceholderFragment.newInstance(1);
return true;
}
return super.onOptionsItemSelected(item);
}
public class SectionsPagerAdapter extends FragmentPagerAdapter {
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
return PlaceholderFragment.newInstance(position + 1);
}
@Override
public int getCount() {
return 604;
}
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return "SECTION 1";
case 1:
return "SECTION 2";
case 2:
return "SECTION 3";
}
return null;
}
}
public static class PlaceholderFragment extends Fragment {
private static final String ARG_SECTION_NUMBER = "section_number";
private static final String ARG_PAGE_NUMBER = "page_number";
public static PlaceholderFragment newInstance(int sectionNumber) {
PlaceholderFragment fragment = new PlaceholderFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
}
public PlaceholderFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
TextView textView = (TextView) rootView.findViewById(R.id.section_label);
textView.setTextSize(20);
int page_number_to_go =1;
page_number_to_go = getArguments().getInt(ARG_SECTION_NUMBER);
goToPage(textView, page_number_to_go);
return rootView;
}
public void goToPage(TextView textView, int page_number){
switch (page_number){
case 1:
textView.setText(getString(R.string.page1));
break;
case 2:
textView.setText(getString(R.string.page2));
break;
case 3:
textView.setText(getString(R.string.page3));
break;
case 4:
textView.setText(getString(R.string.page4));
break;
case 5:
textView.setText(getString(R.string.page5));
break;
case 6:
textView.setText(getString(R.string.page6));
break;
case 7:
textView.setText(getString(R.string.page7));
break;
case 8:
textView.setText(getString(R.string.page8));
break;
case 9:
textView.setText(getString(R.string.page9));
break;
case 10:
textView.setText(getString(R.string.page10));
break;
case 11:
textView.setText(getString(R.string.page11));
break;
case 12:
textView.setText(getString(R.string.page12));
break;
}
|
|
|
|
|
Ali_Abdelrhim wrote: My question is, is that the correct example I used (TextView)? Does it meet all of your needs and do what you want?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
|
So, then, do you think it would be helpful to elaborate on what it is currently doing vs. what you want it to do?
|
|
|
|
|
can't run the app in android studio.
|
|
|
|
|
how to code for security feature in android studio for two-way authentication?
|
|
|
|