fragment - required XML attribute adSize was missing

Hey i read many topics and i don't know what i'm doing wrong. When i include ads:adSize="BANNER" ads:adUnitId="@string/admob"its working fine but i want programmatically include admob codeStart.javapublic class Start extends _fragment { public Start() { super(); this.context = M.context; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { View view = inflater.inflate(R.layout.site_reklama, container,false); AdView adView = (AdView) view.findViewById( more

fragment - Filtering listview data of simple_list_item_2 items using searchview and arrayadapter

I'm writing an android application (Min API 14) which consists of 3 tabs that hold a fragment each.One of the fragments holds a list view (with a list view item defined as simple_list_item_2) and a search view. Now, I'm trying to filter the data in the list view by a room's name (Room is my model) protected SearchView searchView; protected ListView view; protected List<Room> rooms; protected ArrayAdapter<Room> roomAdapter; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, ...Read more

GLSL - how to force rendering a fragment?

is there any way to force rendering a particuar fragment. As far as I know, fragment shaders are called only for pixels within rasterized triangles. What I need to do is to draw a mark(say a single red pixel) in a constant position on the viewport. I mean something like this:void main(void) {if(gl_FragCoord.x == vec2(300.5, 300.5)){ gl_FragColor = vec4(1.0,0.0,0.0,1.0);}else {gl_FragColor = getColorFromSampler();},while there's no quad nor nothing behind fragment (300.5, 300.5). I don't want to affect performance (no fake background and stuf...Read more

webgl - Drawing a rectangle in a Fragment Shader

I'd like to know if there is a possibility to draw a rectangle in a fragment shader without using any if. I tried this :void main(void){ vec2 resolution = vec2( 300.0, 300.0 ); vec2 center = resolution / 2.0; vec2 position = ( gl_FragCoord.xy - center ) / resolution; if ( ( abs(position.x) < 0.5 ) && ( abs(position.y) < 0.5 ) ) gl_FragColor = vec4( 0.0, 0.0, 1.0, 1.0 );}And when i test if the pixel is in the rectangle i must perform an if test.I think there's a solution not to have an if, if you can help me ?...Read more

LibGDX - Comparing Sprites in the Fragment Shader

I am working on a LibGDX project, and I would like to be able to modify things like the color and alpha of a sprite, specifically on any part that overlaps the previously placed one. From what I can tell, this would only be possible by somehow comparing the two inside of the fragment shader and then modifying the individual fragments as necessary in there.My problem at the moment is that I am having trouble figuring out how to even get the data from both sprites into the fragment shader to do these comparisons. Since any sprites that need to ...Read more

fragment - DialogFragment won't open after 30 times - android

I came across a problem in dialog fragment. After opening dialogfragment 30 times, the next one blur the screen but no content. Is there a solution??here is parent fragment:DialogFragment newFragment = new B3Fragment();, "");Here is my onCreateDialog:public Dialog onCreateDialog(Bundle savedInstanceState) { View view = getActivity().getLayoutInflater().inflate(R.layout.fragment_b3, new LinearLayout(getActivity()), false); // Build dialog Dialog builder = new Dialog(getActivity()); builder.request...Read more

relativelayout - Need advise in using Fragment Manager inside Relative Layout

Hello I have a question about using Fragment Manager inside Relative Layout and I have tryed a lot of different codes that I have found here but non of them help me. I've create a list of question that get out of my Data Base and I can get transfer from this list to second page with full explanation from my DB. in my code getFragmentManager lights in red.Can any one help me to figure it out and solve this issue? public class RuleButton extends RelativeLayout {private TextView namerul;private String nameRule = "";public RuleButton(Context contex...Read more

fragment - when click on button for change font size ma app get crash and say attemp a null object reference

I have the Fragments with button and textview that Fill my Activity but when i clicking the Increase button for change size of font My App get crash and give me the following error. how can i change increase text font size with button click?MyFragmentpackage com.miracle.royapoldari.royapoldari;import android.content.Intent;import android.os.Bundle;import;import android.util.TypedValue;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import android.widget.Button;import andr...Read more

fragment - Visualizar mi inicio en Navigation Drawer

Intento que el navigation drawer inicie y lo primero que visualice sea la primera opción del menú (La primera opcion se llama inicio) sin necesidad que el usuario lo seleccione. Les dejo el código si pueden ayudarme:public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, ChatAlumno.OnFragmenItemSelectedListener, ActividadesAlumno.OnFragmenItemSelectedListener, AsesoriasAlumno.OnFragmenItemSelectedListener, ManualAlumno.OnFragmenItemSelectedListener, InicioAlumno.OnFragmenItemSelecte...Read more

ImageView siempre null por fragment

Quiero cambiar en la app el fragment de settings y quiero empezar por la imagen del usuario que es el cuadro de abajo.en el onCreate mDatabase = FirebaseDatabase.getInstance().getReference().child( "Users" ).child( uiD ); mDatabase.addValueEventListener( new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { users = dataSnapshot.getValue( User.class ); url=users.getAvatar(); url(); } @Override public void onCancelled(final DatabaseError...Read more

fragment - Reasonable maximum IPv6 header size

IPv6 requires a minimum MTU of 1280. Of that, there's a minimum 40 bytes required for the IPv6 header. There's no defined limit to how many bytes the IPv6 extension headers can consume. What's a reasonable maximum to assume for normal UDP usage? I've seen it suggested, that at least 8 bytes for the fragment header, what else may crop up?...Read more